• 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 11:24:48 -0700

> On Jul 12, 2017, at 10:38 AM, Charles Srstka <email@hidden> wrote:
>
> While that’s true, the main reason, as I understand it, that ARC doesn’t know
> enough about the object’s lifetime is that non-ARC code may be calling the
> method. In an all-ARC world, a method could always just return objects with a
> +1 retain count, and the consumer could just assume that and always balance
> the retain.

It could, but that results in _enormous_ numbers of retain/release calls. (I
speak from some experience, having once worked on performance optimization of a
project that did ref-counting this way.)

It’s generally cheaper overall to use autorelease, and that was one of the
reasons NeXT invented it* (besides the obvious benefit of simplifying MRR code.)

—Jens

* I’m not actually sure they did; there’s an earlier technique called “deferred
reference counting” that might be equivalent.
_______________________________________________

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: Who owns a child view controller?
      • From: Charles Srstka <email@hidden>
    • Re: Who owns a child view controller?
      • From: Greg Parker <email@hidden>
    • Re: Who owns a child view controller?
      • From: Jeremy Hughes <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>)

  • Prev by Date: Re: Who owns a child view controller?
  • Next by Date: Re: Who owns a child view controller?
  • Previous by thread: Re: Who owns a child view controller?
  • Next by thread: Re: Who owns a child view controller?
  • Index(es):
    • Date
    • Thread