@Dan: The latter seems to not involve copying the objects in the array, so it might be a little faster.
I don't think -copy does a "deep copy" for NSArray. If it did, it would cause big problems for array of objects which don't implement the NSCopying protocol.
It's possible foundation value objects (numbers, strings, etc) are special-cased, but my guess is that they're not.
by Scott Stevenson — Oct 27
I don't think -copy does a "deep copy" for NSArray. If it did, it would cause big problems for array of objects which don't implement the NSCopying protocol.
It's possible foundation value objects (numbers, strings, etc) are special-cased, but my guess is that they're not.