• 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: Who owns a child view controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Who owns a child view controller?


  • Subject: Re: Who owns a child view controller?
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 12 Jul 2017 17:36:12 -0700

> On Jul 12, 2017, at 2:03 PM, Greg Parker <email@hidden> wrote:
>
> The benefit of the autoreleasing convention comes when you can return an
> unretained value without a retain/autorelease pair, because you "know" that
> the object will live long enough for the callee to use it. This does in fact
> avoid lots of retain/release pairs in carefully written code.

Yes, this is what I was referring to. I’d forgotten that ARC won’t do this,
because it has to guarantee safety. In my pre-ARC code I routinely did this,
and only ran into problems with it a handful of times, so I felt it was a
valuable optimization (especially in the early 2000s when CPUs were slower.)

—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

References: 
 >Who owns a child view controller? (From: Jeremy Hughes <email@hidden>)
 >Re: Who owns a child view controller? (From: Jens Alfke <email@hidden>)
 >Re: Who owns a child view controller? (From: Jeremy Hughes <email@hidden>)
 >Re: Who owns a child view controller? (From: Jens Alfke <email@hidden>)
 >Re: Who owns a child view controller? (From: Charles Srstka <email@hidden>)
 >Re: Who owns a child view controller? (From: Jens Alfke <email@hidden>)
 >Re: Who owns a child view controller? (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: Who owns a child view controller?
  • Next by Date: Re: cell-based NSTableView, NSArrayController and first responder
  • Previous by thread: Re: Who owns a child view controller?
  • Next by thread: Re: Who owns a child view controller?
  • Index(es):
    • Date
    • Thread