• 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: when should my NSWindowController be released?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when should my NSWindowController be released?


  • Subject: Re: when should my NSWindowController be released?
  • From: Jamie Hardt <email@hidden>
  • Date: Fri, 12 Sep 2008 18:02:25 -0700

On Sep 12, 2008, at 5:53 PM, Ken Thomases wrote:

Cocoa doesn't bother doing a full release/dealloc of your application object (and the things it owns) at application termination. The principle is that the OS is about to cleanup the whole process's address space in one fell swoop, so there's no point in doing it piecemeal first.


I think his question, and I've wondered about this too, is when do NSWindowControllers owned by an NSDcoument get deallocated? In the past I've put breakpoints on [NSWindowController dealloc] and have open and closed documents like crazy, and -dealloc never seems to get called:

On Sep 12, 2008, at 2:44 PM, Paul Archibald wrote:

My question is about creating and destroying my controller. I have - initMyController and -windowDidLoad methods, which handle setting up my controller, but for some reason my -dealloc method is never called, even when the main app quits. In fact, the -dealloc method in the main controller is never called either. (I did not work on the main controller code.)

Jamie Hardt The Sound Department http://www.soundepartment.com/ http://www.imdb.com/name/nm0362504/

_______________________________________________

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


  • Follow-Ups:
    • Re: when should my NSWindowController be released?
      • From: "Michael Ash" <email@hidden>
References: 
 >when should my NSWindowController be released? (From: Paul Archibald <email@hidden>)
 >Re: when should my NSWindowController be released? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: when should my NSWindowController be released?
  • Next by Date: Core Data, Bindings, NSSearchField, and NSPopUpButton
  • Previous by thread: Re: when should my NSWindowController be released?
  • Next by thread: Re: when should my NSWindowController be released?
  • Index(es):
    • Date
    • Thread