Re: Ownership of nib instances
Re: Ownership of nib instances
- Subject: Re: Ownership of nib instances
- From: Ondra Cada <email@hidden>
- Date: Thu, 18 Oct 2001 01:26:17 +0100
Joe,
>
>>>>> Joe Chan (JC) wrote at Wed, 17 Oct 2001 19:13:52 -0400:
JC> >If the File Owner happens to be an NSWindowController, it
JC> >really has some
JC> >kind of hidden reference to all those objects, and it truly
JC> >releases them
JC> >when it is unallocated.
JC> >
JC> >Though, if you use a different class for File Owner, you have
JC> >to do that yourself.
JC>
JC> Where is it documented that who owns (or not) which object in a
JC> nib? In general, if I have a network of objects in a nib, what
JC> rules should I use to establish ownership?
There are no hard rules. Generally, though
- root objects are owned by File Owner;
- embedded objects (usually subviews) are owned by their enclosing objects
(usually superviews).
Actually, I guess it might be more consistent if loaded NIBs were
autoreleased. They are not, though, so we have to cope with that ;)
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc