NextPrevUpTopContentsIndex

1.3.8 Memory management

Objective-C uses reference counting for its memory management and also provides a mechanism for decrementing the reference count of an object when control returns to the event loop or some other well-defined point.

The following functions are direct equivalents of the memory management methods in the NSObject class:

Helper functions for memory management

Function

Method in NSObject

retain

retain

retain-count

retainCount

release

release

autorelease

autorelease

In addition, the function make-autorelease-pool and the macro with-autorelease-pool can be used to make autorelease pools if the standard one in the event loop is not available.


LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 4 Apr 2005

NextPrevUpTopContentsIndex