All Manuals > LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual > 1 Introduction to the Objective-C Interface > 1.3 Invoking Objective-C methods

NextPrevUpTopContentsIndex

1.3.9 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 - 15 Dec 2011

NextPrevUpTopContentsIndex