Contents

initWithCapacity

Initializes a new instance of OSArray.

Declaration

virtual bool initWithCapacity(
 unsigned intcapacity);

Parameters

  • capacity:

    The initial storage capacity of the array object.

Return Value

true on success, false on failure.

Overview

Not for general use. Use the static instance creation method withCapacity instead.

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