NSPointerArray is a mutable collection modeled after NSArray but it can also hold NULL values, which can be inserted or extracted (and which contribute to the object’s count).
NSPointerArray is a mutable collection modeled after NSArray but it can also hold NULL values, which can be inserted or extracted (and which contribute to the object’s count). Moreover, unlike traditional arrays, you can set the count of the array directly. In a garbage collected environment, if you specify a zeroing weak memory configuration, if an element is collected it is replaced by a NULL value.
The copying and archiving protocols are applicable only when a pointer array is configured for object uses.
The fast enumeration protocol (that is, use a pointer array in the for...in language construct—see “Fast Enumeration Makes It Easy to Enumerate a Collection” in Programming with Objective-C) will yield NULL values that are present in the array. It is defined for all types of pointers although the language syntax doesn’t directly support this.