Re: ARC Retain Cycles
Re: ARC Retain Cycles
- Subject: Re: ARC Retain Cycles
- From: Graham Cox <email@hidden>
- Date: Fri, 25 Apr 2014 13:45:52 +1000
On 25 Apr 2014, at 11:24 am, Dave <email@hidden> wrote:
> I always knew autorelease was bad news!
No it isn't, at least not inherently. But if you don't properly understand it then it can bite you. You've trodden this path before, and I don't want to rehash all that, but you were wrong then as well. If you spend a little time with manual memory management thinking in terms of object ownership, the conventions and rules become really obvious. Moving to ARC does not, I think, remove the need for the same understanding. In some ways it makes it more critical.
You cannot avoid autorelease - the frameworks must use it to be consistent with the established rules, so even if you avoid it religiously in your own code (and it is just dogma to do so) then you still have to deal with objects returned by other code.
--Graham
_______________________________________________
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