An instance of
NSPointer defines callout functions appropriate for managing a pointer reference held somewhere else.
- iOS 6.0+
- macOS 10.5+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
The functions specified by an instance of
NSPointer are separated into two clusters—those that define “personality” such as “object” or "C-string”, and those that describe memory management issues such as a memory deallocation function. There are constants for common personalities and memory manager selections (see Memory and Personality Options).
NSPointer use an
NSPointer object to define the acquisition and retention behavior for the pointers they manage. Note, however, that not all combinations of personality and memory management behavior are valid for these collections. The pointer collection objects copy the
NSPointer object on input and output, so you cannot usefully subclass
NSPointer is not suitable for subclassing.