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

when should my NSWindowController be released?


  • Subject: when should my NSWindowController be released?
  • From: Paul Archibald <email@hidden>
  • Date: Fri, 12 Sep 2008 14:44:45 -0700

Hey folks,

The app I am working on has 2 windows. My project has been to implement the 2nd window. I added a new nib file and a new class, MyController:NSWindowController. In the MainController:NSObject implementation, there is a MyController object, which can be shown or hidden by the user.

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.)

So, what is the general outline of properly allocating, initializing and deallocating an application and its elements? Can someone point me to the right documentation? I can't seem to find reference to this subject.

I thought -dealloc was called automagically on objects that are properly handled (ie: not leaking). I have been assuming the main app was behaving correctly, as I have not seen any warnings while debugging or even running some tools on it.

Paul
_______________________________________________

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: Ken Thomases <email@hidden>
  • Prev by Date: Re: Newb: Targeting an instance of a class instantiated by a NIB file
  • Next by Date: NSXMLParser and character entities?
  • Previous by thread: Re: Windows
  • Next by thread: Re: when should my NSWindowController be released?
  • Index(es):
    • Date
    • Thread