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
copyCollectionensureCapacityflushCollectionfreegetCapacitygetCapacityIncrementgetCountgetObjectgetObject(const OSString *)getObject(const OSSymbol *)initWithCapacityinitWithDictionaryinitWithObjects(const OSObject *, const OSString *, unsigned int, unsigned int)initWithObjects(const OSObject *, const OSSymbol *, unsigned int, unsigned int)isEqualToisEqualTo(const OSDictionary *)isEqualTo(const OSDictionary *, const OSCollection *)mergeremoveObjectremoveObject(const OSString *)removeObject(const OSSymbol *)serializesetCapacityIncrementsetObjectsetObject(const OSString *, const OSMetaClassBase *)setObject(const OSSymbol *, const OSMetaClassBase *)withDictionarywithObjects(const OSObject *, const OSString *, unsigned int, unsigned int)withObjects(const OSObject *, const OSSymbol *, unsigned int, unsigned int)