Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
First of all, let's clarify that I'm talking about ObjC prior to version 2.0. So, there is no garbage collection.

In a foundation tool (command line objc program), what is the difference between instantiating an object using alloc-init, and using a class method like "[NSSTring stringWithString]" in terms of memory management?

And the same question applies for Cocoa applications.

Is there any reference I can read up on those things?
 
Under GC, there no longer is a difference between the convenience allocators and the regular allocators—except that they are still convenient.

With GC, -release, -autorelease, and -retain are just empty methods that take no effect.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.