• 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: Steve Christensen <email@hidden>
  • Date: Wed, 12 Jul 2017 13:59:05 -0700

On Jul 12, 2017, at 1:16 PM, Jeremy Hughes <email@hidden> wrote:
>
>> On 12 Jul 2017, at 19:25, Jens Alfke <email@hidden> wrote:
>>
>>>
>>> On Jul 12, 2017, at 10:57 AM, Jeremy Hughes <email@hidden>
>>> wrote:
>>>
>>> Wouldn’t it be ARC (rather than the consumer) that is balancing retains?
>>
>> Yes. ARC internally generates calls to -autorelease (or actually to some C
>> functions in the runtime that invoke autorelease.)
>
> Well, my original example was of native Swift objects that are released
> instantly and Cocoa objects that are not, and you suggested that the Cocoa
> objects are using autorelease - which makes sense, because Cocoa has to
> support ARC and non-ARC code.
>
> Is there any evidence that ARC is internally generating autorelease calls for
> native Swift code?

It's also possible that, as an implementation detail, AppKit isn't
disconnecting the view controller's view from the view hierarchy until it gets
around to doing all the other view processing like redraws. If so then the view
could be holding on to its view controller until that time. Or there's
something else going on under the covers.

Unless it's really important for you to expect that the child view controller
has disappeared immediately then it's probably better just to assume that it
has (or will) and move on to other things.

_______________________________________________

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: Quincey Morris <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: 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>)

  • 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