CFDictionaryCreateMutableCopy(_:_:_:)
Creates a new mutable dictionary with the key-value pairs from another dictionary.
Declaration
func CFDictionaryCreateMutableCopy(_ allocator: CFAllocator!, _ capacity: CFIndex, _ theDict: CFDictionary!) -> CFMutableDictionary!Parameters
- allocator:
The allocator to use to allocate memory for the new dictionary and its storage for key-value pairs. Pass
NULLor Kcfallocatordefault to use the current default allocator. - capacity:
The maximum number of key-value pairs that can be contained by the new dictionary. The dictionary starts with the same number of key-value pairs as
theDictand can grow to this number of values (and it can have less).Pass
0to specify that the maximum capacity is not limited. If non-0,capacitymust be greater than or equal to the count oftheDict. - theDict:
The dictionary to copy. The keys and values from the dictionary are copied as pointers into the new dictionary, not that which the values point to (if anything). The keys and values are also retained by the new dictionary. The count of the new dictionary is the same as the count of
theDict. The new dictionary uses the same callbacks astheDict.
Return Value
A new dictionary that contains the same values as theDict. Ownership follows the The Create Rule.