• 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: Ownership of nib instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ownership of nib instances


  • Subject: Re: Ownership of nib instances
  • From: Scott Herz <email@hidden>
  • Date: Wed, 17 Oct 2001 16:33:54 -0700

Here are <echoing voice> THE RULES:

The File's Owner owns any top level items in the nib. Basically everything in the document window except First Responder* is a Top Level Object. It is the responsibility of the File's Owner to release top level objects. There are some exceptions. For convenience**, windows will commit suicide for you if you check the Release on Close box. Also, as mentioned below, if the File's Owner is a window controller, it will help you out by releasing any top level objects for you.

Scott.

*The First Responder isn't a real object. It's an abstract representation of the responder chain and therefore cannot be released...although you can try (it's nil).
**For whose convenience I don't know...certainly not mine, since I'm left explaining it all of the time, but I'm happy to do it.

On Wednesday, October 17, 2001, at 04:13 PM, Joe Chan wrote:

JC> It seems to me that the file
JC> owner object some how has a hidden reference to all those
JC> instances, and as the file owner goes away, so do those objects.

If the File Owner happens to be an NSWindowController, it really has some
kind of hidden reference to all those objects, and it truly releases them
when it is unallocated.

Though, if you use a different class for File Owner, you have to do that yourself.

Where is it documented that who owns (or not) which object in a nib? In general, if I have a network of objects in a nib, what rules should I use to establish ownership?

-----------
Joe Chan
email@hidden
http://www.firstian.com
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Re: Ownership of nib instances (From: Joe Chan <email@hidden>)

  • Prev by Date: Re: Ownership of nib instances
  • Next by Date: Re: nobody knows, or just can't be done?
  • Previous by thread: Re: Ownership of nib instances
  • Next by thread: Re: Ownership of nib instances
  • Index(es):
    • Date
    • Thread