Re: ARC vs Manual Reference Counting
Re: ARC vs Manual Reference Counting
- Subject: Re: ARC vs Manual Reference Counting
- From: Greg Parker <email@hidden>
- Date: Mon, 09 Sep 2013 16:02:02 -0700
On Sep 9, 2013, at 3:45 PM, Patrick Cusack <email@hidden> wrote:
> I appreciate everyone's replies. It was a question asked in complete humility. I agree that computers can do analysis much better than humans and that the less code you write, the less you have to debug, so ARC makes a lot of sense. My question really stemmed from Apple's WWDC lecture which appeared to justify the switch on the flimsiest of grounds, ie no longer having to be confused by [NSString stringWithFormat:] vs [NSString initWithString:] which is a pretty easy memory management rule.
That's not the only motivation, but it's an easy one to illustrate on a slide.
It may be a simple rule, but the static analyzer taught us that everybody gets it wrong at least sometimes.
Fortunately, the static analyzer also taught us that the Cocoa memory management rules were followed strictly enough in practice to allow them to be automated with only a handful of special cases. Thus, ARC.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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