Object Allocation

These functions may be used to create and destroy Objective-C objects, as well as to manage the reference counts of objects.

NSAllocateObject

id NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone)

NSCopyObject

id NSCopyObject(id object, unsigned extraBytes, NSZone *zone)

NSDeallocateObject

void NSDeallocateObject(id object)

NSDecrementExtraRefCountWasZero

BOOL NSDecrementExtraRefCountWasZero(id object)

NSExtraRefCount

unsigned NSExtraRefCount(id object)

NSIncrementExtraRefCount

void NSIncrementExtraRefCount(id object)

NSShouldRetainWithZone

BOOL NSShouldRetainWithZone(id anObject, NSZone *requestedZone)

Get Cocoa in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.