Creates a new empty mutable array.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The allocator to use to allocate memory for the new array and its storage for values. Pass
kto use the current default allocator.
The maximum number of values that can be contained by the new array. The array starts empty and can grow to this number of values (and it can have less).
0to specify that the maximum capacity is not limited. The value must not be negative.
A pointer to a
CFArraystructure initialized with the callbacks for the array to use on each value in the array. A copy of the contents of the callbacks structure is made, so that a pointer to a structure on the stack can be passed in or can be reused for multiple array creations.
If the array contains CFType objects only, then pass
kto use the default callback functions.
CFType Array Call Backs
This parameter may be
NULL, which is treated as if a valid structure of version
0with all fields
NULLhad been passed in.
If any of the fields are not valid pointers to functions of the correct type, or this parameter is not a valid pointer to a
CFArraystructure, the behavior is undefined. If any value put into the array is not one understood by one of the callback functions, the behavior when that callback function is used is undefined.
A new mutable array, or
NULL if there was a problem creating the object. Ownership follows the The Create Rule.