In an Objective-C program, it is important to ensure that objects are deallocated when they are no longer needed—otherwise your application’s memory footprint is larger than necessary. It is also important to ensure that you do not deallocate objects while they’re still being used.
Objective-C 2.0 offers two paradigms for memory management that allow you to meet these goals:
Managed memory, where you are ultimately responsible for determining the lifetime of objects using a technique called reference counting.
Managed memory is described in Memory Management Programming Guide for Cocoa.
Garbage collection, where you pass responsibility for determining the lifetime of objects to an automatic “collector.”
Garbage collection is described in Garbage Collection Programming Guide.
Last updated: 2008-02-05