• 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
Beginner Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Beginner Questions


  • Subject: Beginner Questions
  • From: James Spencer <email@hidden>
  • Date: Tue, 1 Feb 2005 20:58:34 -0600

I'm having trouble understanding how dellocation of objects instantiated in nib files is handled. The question arises in connection with my first Cocoa application utilizing bindings.

I have a simple document based application. The nib for the document contains, in addition to the main window for the document, a custom NSArrayController. The nib file's owner is the document. I have noted that when the main window is closed, the document is being closed and deallocated. What has me confused is that my custom NSArrayController is NOT being deallocated. Now, obviously I can release the controller from my document's dealloc method or I can watch for the window's notification of it's intent to close and have the controller release itself when it gets notified but I had thought that in a document based application, all top level objects in the nib (which in this case includes my array controller) would be released when the document got released.

Can anyone give me the quick nickel tour of what get's closed when a window, which was loaded with the rest of a nib by the document, is closed?

Thanks,

Spence

James P. Spencer
Rochester, MN

email@hidden

"Badges??  We don't need no stinkin badges!"

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Beginner Questions
      • From: j o a r <email@hidden>
  • Prev by Date: Re: NSDateFormatter
  • Next by Date: Re: NSDateFormatter
  • Previous by thread: Re: NSDateFormatter
  • Next by thread: Re: Beginner Questions
  • Index(es):
    • Date
    • Thread