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.
Re: Reference counting
by Rayiner Hashem on Wed 7th May 2003 13:21 UTC

I'd hardly say that reference counting GC has become "discredited." I haven't used ObjC, but I have used the reference counting equivilent in C++. A reference counting smart pointer, like shared_ptr from Boost, is just as good as garbage collection in most cases. All you have to remember is that instead of:

int* i = new int

you do:
shared_ptr<int> i = new int

After this, 'i' will automatically take care of deallocating memory when it goes out of scope.