Partially answered here: NSArray size and variability
NSMutableArray is not noticeably slower or larger (from memory) than NSArray. This is basically just an NSArray that redistributes itself when it is populated as a more massive array, and continues to do so when you add elements to it.
The reason you copy mutable arrays as immutable when you assign them values ββin your class is because you can guarantee that their values ββdo not change. If you store a modified array in your class, other code may change its values ββoutside of your class without calling any of your methods. This leaves you vulnerable to crashes due to internal inconsistency errors in your classes.
For example, suppose that when an array was installed, you cached the length of the array as an int property in its class. That would be fine if the array was immutable, but if it was modified, someone else could change the array, and your cached value would now be wrong, but you don't know that.
However, this does not need to be done manually. If you declare the properties of the array as:
@property (nonatomic, copy) NSArray *foo;
Then, whenever you assign an object.foo array, it will be automatically copied. You do not need to copy it again. It is best to use the copy property type instead of strong / hold for any type that has a mutable option, for example:
@property (nonatomic, copy) NSArray *foo; @property (nonatomic, copy) NSString *foo; @property (nonatomic, copy) NSDictionary *foo; @property (nonatomic, copy) NSData *foo; etc...
However, be careful not to use it for mutable properties, or it will make an immutable copy stored in a property that considers it mutable and causes a crash if you try to mutate it. The synthetic property of the copy is not intelligent enough to automatically use mutableCopy.
@property (nonatomic, copy) NSMutableArray *foo;