CFArrayCreateMutableCopy(_:_:_:)
Creates a new mutable array with the values from another array.
Declaration
func CFArrayCreateMutableCopy(_ allocator: CFAllocator!, _ capacity: CFIndex, _ theArray: CFArray!) -> CFMutableArray!Parameters
- allocator:
The allocator to use to allocate memory for the new array and its storage for values. Pass
NULLor Kcfallocatordefault to use the current default allocator. - capacity:
The maximum number of values that can be contained by the new array. The array starts with the same number of values as
theArrayand 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 oftheArray. - theArray:
The array to copy. The pointer values from the array are copied into the new array. However, the values are also retained by the new array.
Return Value
A new mutable array that contains the same values as theArray. The new array has the same count as the theArray and uses the same callbacks. Ownership follows the The Create Rule.