Linked by Jared White on Wed 7th May 2003 07:13 UTC
General Development Welcome back to Part 2 of Cocoa 101: Object-Oriented Programming for the Masses! I received a lot of great feedback on my previous article, and I'm looking forward to sharing with you once again what I've learned about Cocoa and the Objective-C language. If you missed Part 1 of this tutorial, read it here.
Permalink for comment
To read all comments associated with this story, please click here.
Garbage Collection
by Pete on Wed 7th May 2003 12:07 UTC

As described, it sounds like Objective-C uses reference counting and language keywords for memory management.

I'll stick with Java... (At the expense of running a background thread to handle GC)

Reference counting was a technique explored in C++ texts as a prototypical garbage collection approach. (Scott Myers, smart pointers? I could be wrong.)

It sounds like extra work for the programmer, implementing code to do reference checks everywhere. And if you miss some, potentially problems abound.

I'm not saying Java doesn't have memory issues, just that the technique in objective-C has been discredited.

Ultimately a question of pre-compile checking through development tools (obj-c) or by the runtime system (java)

See
http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc_p.html
For details of GC. (A very old article, not accounting for advancements in JVM technology over nearly 7 years!!)