Framework
- Core Foundation
Overview
CFMutableArray manages dynamic arrays. The basic interface for managing arrays is provided by CFArray. CFMutableArray adds functions to modify the contents of an array.
You create a mutable array object using either the CFArray
or CFArray
function.
CFMutableArray provides several functions for changing the contents of an array, for example the CFArray
and CFArray
functions add values to an array and CFArray
removes values from an array. You can also reorder the contents of an array using CFArray
and CFArray
.
CFMutableArray is “toll-free bridged” with its Cocoa Foundation counterpart, NSMutable
. This means that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object. Therefore, in a method where you see an NSMutable
parameter, you can pass in a CFMutable
, and in a function where you see a CFMutable
parameter, you can pass in an NSMutableArray instance. This fact also applies to concrete subclasses of NSMutableArray. See Toll-Free Bridged Types for more information on toll-free bridging.