• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ARC Retain Cycles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: ARC Retain Cycles
      • From: Dave <email@hidden>
References: 
 >ARC Retain Cycles (From: Dave <email@hidden>)
 >Re: ARC Retain Cycles (From: Cody Garvin <email@hidden>)
 >Re: ARC Retain Cycles (From: Jens Alfke <email@hidden>)
 >Re: ARC Retain Cycles (From: Roland King <email@hidden>)
 >Re: ARC Retain Cycles (From: Greg Parker <email@hidden>)
 >Re: ARC Retain Cycles (From: Roland King <email@hidden>)
 >Re: ARC Retain Cycles (From: Roland King <email@hidden>)
 >Re: ARC Retain Cycles (From: Dave <email@hidden>)

  • Prev by Date: Re: GCD killed my performance
  • Next by Date: Re: NSToolbarItem Action Not Passed to NSButton...
  • Previous by thread: Re: ARC Retain Cycles
  • Next by thread: Re: ARC Retain Cycles
  • Index(es):
    • Date
    • Thread