when should my NSWindowController be released?
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