Contents

withCapacity

Creates and initializes an empty OSDictionary.

Declaration

static OSDictionary * withCapacity(
 unsigned intcapacity);

Parameters

  • capacity:

    The initial storage capacity of the new dictionary object.

Return Value

An empty instance of OSDictionary with a retain count of 1; NULL on failure.

Overview

capacity must be nonzero. The new dictionary will grow as needed to accommodate more key/object pairs (unlikeCFMutableDictionary, for which the initial capacity is a hard limit).

See Also

Miscellaneous