Re: Who owns a child view controller?
Re: Who owns a child view controller?
- Subject: Re: Who owns a child view controller?
- From: Quincey Morris <email@hidden>
- Date: Wed, 12 Jul 2017 14:07:55 -0700
On Jul 12, 2017, at 13:59 , Steve Christensen <email@hidden> wrote:
>
> 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.
In principle, this kind of reasoning is correct. In fact, view controllers are
unusual that none of the standard Cocoa components hold strong references to
them (in 10.12+ they are in the responder chain, but I assume these are
unretained references), except the parent view controller when there is a
containment hierarchy.
> Or there's something else going on under the covers.
Yes, you are correct, betting *against* this assumption is a really, really
terrible idea. Reasoning about the point at which objects actually deallocate
is a code smell.
_______________________________________________
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