NSMutableArray — Mac OS X 10.0
This class extends the API of NSArray
to allow for
mutable, ordered collections of objects.
NSMutableArray
provides five primitive methods,
which form the basis for the rest of its methods:
addObject
:,
insertObject:atIndex
:,
removeLastObject
,
removeObjectAtIndex
:, and
replaceObjectAtIndex:withObject
:. When an object
is added to
an
array, the array asserts some ownership over the object by sending it
a retain
message. Likewise, when an object is
removed from an array, it is sent a release
message by the array.
NSMutableArray
is toll-free bridged with the Core
Foundation type CFArray
. As such,
NSMutableArray
objects can be used interchangeably
with the CFArray
pointer type,
CFArrayRef
.