CFDictionaryCreateCopy

Header: CFDictionary.h Carbon status: Supported

Creates a new immutable dictionary with the key-value pairs from the given dictionary.

CFDictionaryRef CFDictionaryCreateCopy (
    CFAllocatorRef allocator, 
    CFDictionaryRef dict
);
Parameter descriptions
allocator

The CFAllocator which should be used to allocate memory for the dictionary 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.

dict

The dictionary which is to be copied. The keys and values from the dictionary are copied as pointers into the new dictionary (that is, the values themselves are copied, not that which the values point to, if anything). However, the keys and values are also retained by the new dictionary using the retain function of the original dictionary. The count of the new dictionary will be the same as the given dictionary. The new dictionary uses the same callbacks as the dictionary to be copied. If this parameter is not a valid CFDictionary, the behavior is undefined.

function result

A reference to the new immutable CFDictionary.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


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