withCapacity
Creates and initializes an empty OSArray.
Declaration
static OSArray * withCapacity(
unsigned intcapacity);Parameters
- capacity:
The initial storage capacity of the array object.
Return Value
An empty instance of OSArray with a retain count of 1; NULL on failure.
Overview
capacity must be nonzero. The new array will grow as needed to accommodate more objects (unlikeCFMutableArray, for which the initial capacity is a hard limit).
See Also
Miscellaneous
copyCollectionensureCapacityflushCollectionfreegetCapacitygetCapacityIncrementgetCountgetLastObjectgetNextIndexOfObjectgetObjectinitWithArrayinitWithCapacityinitWithObjectsisEqualTo(const OSArray *)isEqualTo(const OSMetaClassBase *)mergeremoveObjectreplaceObjectserializesetCapacityIncrementsetObject(const OSMetaClassBase *)setObject(unsigned int, const OSMetaClassBase *)withArraywithObjects