Contents

NSAllocateObject

Creates and returns a new instance of a given class.

Declaration

extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);

Parameters

  • aClass:

    The class of which to create an instance.

  • extraBytes:

    The number of extra bytes required for indexed instance variables (this value is typically 0).

  • zone:

    The zone in which to create the new instance (pass NULL to specify the default zone).

Return Value

A new instance of aClass or nil if an instance could not be created.

Discussion

This function is deprecated and unavailable for use with ARC.

See Also

Object Allocation and Deallocation