CFBagCreateMutableCopy |
||||
Header: | CFBag.h | Carbon status: | Supported | |
Creates a mutable copy of a CFBag object.
CFMutableBagRef CFBagCreateMutableCopy ( CFAllocatorRef allocator, CFIndex capacity, CFBagRef bag );
Pass a reference to an allocator object to be used to allocate memory for the CFBag object and its stored values. Pass NULL or kCFAllocatorDefault if the current default allocator should be used.
Specify the number of values that the CFBag object can contain. Pass zero if there is no limitation (other than available memory and address space) on the number of contained values.
Pass a reference to the CFBag object to be copied. If this parameter is non-zero but is less that the number of values in the original, the behavior is undefined.
A reference to a mutable CFBag object or NULL if there was a problem creating the object.
The CFBagCreateMutableCopy function creates an mutable copy of an existing CFBag object. The values are copied as pointers into the new CFBag object (that is, values are themselves copied, not that which they point to). The callbacks that the original uses to retain, release, compare, and describe values are reused for the copy. The capacity parameter specifies the maximum number of values that the CFBag object can contain. If it is zero, then there is no limit to the number of values that can be added (aside from constraints such as available memory).
Supported in Carbon. Available in Carbon 1.0.2 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)