Re: Who owns a child view controller?
Re: Who owns a child view controller?
- Subject: Re: Who owns a child view controller?
- From: Jeremy Hughes <email@hidden>
- Date: Fri, 14 Jul 2017 12:03:02 +0100
> On 13 Jul 2017, at 20:29, Alex Zavatone <email@hidden> wrote:
>
> One thing that I had to learn was to break my expectations of when a view
> controller (one that is tied to a navigationController) is deallocated.
I’m not sure that view controllers are special. My understanding is that
objects that are instantiated from a nib are not (usually or ever?) deallocated
- there is always a top-level object that holds a retain count - but objects
that are created programmatically follow normal memory rules - they are
deallocated when you (and any autorelease pools) no longer hold a retain count.
I could be wrong.
In addition to autorelease pools there could be other behind-the-scenes
mechanisms (caches etc.) that have retain counts.
Jeremy
_______________________________________________
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