CFArrayCreateMutableCopy

Header: CFArray.h Carbon status: Supported

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

CFMutableArrayRef CFArrayCreateMutableCopy (
    CFAllocatorRef allocator, 
    CFIndex capacity, 
    CFArrayRef srcArray
);
Parameter descriptions
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.

capacity

The maximum number of values that can be contained by the CFArray. The array starts empty, and can grow to this number of values (and it can have less). If this parameter is 0, the array's maximum capacity is unlimited (or rather, only limited by address space and available memory constraints). This parameter must be greater than or equal to the count of the array which is to be copied, or the behavior is undefined. If this parameter is negative, the behavior is undefined.

srcArray

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.

function result

A reference to the new mutable CFArray.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)