Re: ARC vs Manual Reference Counting
Re: ARC vs Manual Reference Counting
- Subject: Re: ARC vs Manual Reference Counting
- From: Alex Zavatone <email@hidden>
- Date: Mon, 09 Sep 2013 10:29:21 -0400
On Sep 9, 2013, at 3:58 AM, Tom Davie wrote:
>
> On 9 Sep 2013, at 09:44, Kyle Sluder <email@hidden> wrote:
>
>> Thirded. I thought I wouldn't like it. As soon as I didn't have to manage retains and releases of temporary objects, the discipline completely left my mind. Now whenever I go back to non-ARC code I invariably make a ton of memory management errors, most of which are caught by the analyzer.
>>
>> --Kyle Sluder
>>
>> On Sep 8, 2013, at 11:18 PM, Alex Kac <email@hidden> wrote:
>>
>>> Bingo. We’ve been working with Cocoa/Obj-C for many years, and still we’d find weird errors that would be caused by some over-released object. We cut a ton of code with ARC, and in the end we saw reliability go up and actually even some performance.
I think the big point is that if the compiler can figure out what is no longer needed and can be released, and the compiler can do this (at a reasonable cost to performance), then this is a no brainer.
I'm sure there are special cases where you would want to do your own memory management. And in this case, you can always flag the class files to turn off ARC and manage memory yourself.
Simply put, not having to worry about this gives more brain stack space to fill up with all the other parts of Cocoa and Objective-C that we need to keep track of and saves valuable developer time since it's now rare to have to deal with manual memory management mistakes.
Cheers,
- Alex Zavatone
_______________________________________________
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