Re: Protecting memory
Re: Protecting memory
- Subject: Re: Protecting memory
- From: Jens Alfke <email@hidden>
- Date: Wed, 25 Jul 2012 09:52:43 -0700
On Jul 24, 2012, at 10:07 PM, Crispin Bennett < email@hidden> wrote: Isn't -copy (as already suggested) a simpler option? The NSCopying/NSMutableCopying protocol pair seems to be the most natural Cocoa pattern for making im/mutable copie.
Yes, but then (if not using ARC or GC) you have to autorelease it. Some people prefer +arrayWithArray because it's only one _expression_. I tend to use [[x copy] autorelease], but it's a matter of taste.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden