Function CFArrayCreateCopy

Source
pub unsafe extern "C-unwind" fn CFArrayCreateCopy(
    allocator: Option<&CFAllocator>,
    the_array: Option<&CFArray>,
) -> Option<CFRetained<CFArray>>
Available on crate features CFArray and CFBase only.
Expand description

Creates a new immutable array with the values from the given array.

Parameter allocator: The CFAllocator which should be used to allocate memory for the array and its storage for values. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.

Parameter theArray: The array which is to be copied. The values from the array are copied as pointers into the new array (that is, the values themselves are copied, not that which the values point to, if anything). However, the values are also retained by the new array. The count of the new array will be the same as the given array. The new array uses the same callbacks as the array to be copied. If this parameter is not a valid CFArray, the behavior is undefined.

Returns: A reference to the new immutable CFArray.