CFArrayCreateCopy

Header: CFArray.h Carbon status: Supported

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

CFArrayRef CFArrayCreateCopy (
    CFAllocatorRef allocator, 
    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.

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 immutable CFArray.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


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