Re: NSArray to NSMutableArray
Re: NSArray to NSMutableArray
- Subject: Re: NSArray to NSMutableArray
- From: Jerry Krinock <email@hidden>
- Date: Fri, 28 Nov 2008 18:31:00 -0800
On 28 Nov, 2008, at 6:29 PM, Pierce Freeman wrote:
I am wondering the correct/recommended technique to make a
NSMutableArray
out of a NSArray.
On 2008 Nov, 28, at 17:30, Dave DeLong wrote:
How about -mutableCopy?
which gives you a retained object, and then there is +[NSMutableArray
arrayWithArray:], which gives you a temporary object.
I see online that there are ways to do this, but am not
sure what is the best way.
So I use either, depending on whether I want retained or temporary. I
suspect that it probably doesn't make it damned bit of difference
because all this "mutable" and "copy" fluff gets optimized away under
the hood anyhow.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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