Re: NSArray or MutableArray Null/NIL placeholder
Re: NSArray or MutableArray Null/NIL placeholder
- Subject: Re: NSArray or MutableArray Null/NIL placeholder
- From: Alastair Houghton <email@hidden>
- Date: Wed, 30 May 2007 16:24:36 +0100
On 30 May 2007, at 15:57, Charles Steinman wrote:
To insert a null object into an array, use NSNull. And no, it's not
necessary to retain an object before you put it into an array.
NSArray copies its contents.
NSArray *retains* its contents. It doesn't copy them. There's often
little difference for immutable objects (indeed, -copy often just
does -retain in those cases), but for mutable objects there's a huge
difference so it pays to be precise.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden