Next: 2.9.1 Adding an Object Up: 2 NSArray Previous: 2.8 Searching for an

2.9 NSMutableArray

If you need to add, remove or replace objects in an array, then you should use a NSMutableArray. Generally, you create NSMutableArrays by simply using
NSMutableArray *array;

array = [NSMutableArray new];
(you then need to AUTORELEASE it if needed). This creates an NSMutableArray containing no elements.