Re: ARC [was Protecting against "app nap"]
Re: ARC [was Protecting against "app nap"]
- Subject: Re: ARC [was Protecting against "app nap"]
- From: Jonathan Taylor <email@hidden>
- Date: Thu, 12 May 2016 09:16:03 +0100
Hi Jens,
Thanks again for your reply. I'm sure this has been done to death over the years on the list, but... you would definitely recommend ARC then, would you? I've been a bit put off by what seems like regular questions on the list(s) about debugging and fixing edge cases where ARC doesn't work. I guess that only shows the times when it doesn't work, but it's rather left me thinking that it's just the same, but with less explicit indication of what is going on. Is that an unfair assessment, in your view?
Best regards,
Jonny.
On 11 May 2016, at 16:10, Jens Alfke <email@hidden> wrote:
>
>> On May 11, 2016, at 2:31 AM, Jonathan Taylor <email@hidden> wrote:
>>
>> I guess I just found method naming a bit odd (not really referring to an object at all), and might have expected it to have an ‘alloc/new’ naming since I’d have thought the API would be almost exclusively used for activities that continue beyond the calling scope.
>
> The only methods named +alloc or +new are the core methods on NSObject that instantiate objects. (There’s also -copy and -mutableCopy.) Regular methods don’t use that naming scheme nor return owned references, they just consistently return unowned references. That keeps the rules simpler.
>
> (And I really recommend using ARC! It saves trouble and eliminates a lot of bugs, like this one.)
>
> —Jens
_______________________________________________
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