Contents

NSCopyObject

Creates an exact copy of an object.

Declaration

extern id NSCopyObject(id object, NSUInteger extraBytes, NSZone *zone);

Parameters

  • object:

    The object to copy.

  • 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 object that’s an exact copy of anObject, or nil if object is nil or if object could not be copied.

Discussion

This function is deprecated and unavailable for use with ARC. To create a copy of an object, use the copyWithZone: method instead.

See Also

Object Allocation and Deallocation