O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required