NSDoc and Memory
NSDoc and Memory
- Subject: NSDoc and Memory
- From: Ricky Heywood <email@hidden>
- Date: Mon, 02 Sep 2002 19:33:32 -0700 (MST)
How can a NSDocument get its corresponding window at run time? There is an
IBOutlet called window but you do you get to it since it isn't explicitly
entered into my subclass of NSDocument (CheckRegController.h/m) I found a
work around, but it seems like an odd way of doing it.
I have also noticed a funny thing about my app. You may already know by my
first question, but to spell it out, I am developing a document based Cocoa
app. If I set a breakpoint on init on my subclass of NSDocument, it
"breaks" twice at startup, but only one window opens. Why is that? The top
of the frame section in the debug part of the PB window reads as follows at
the breaks:
(first break)
- [CheckRegController init]
- [NSCustomObject nibInstatiate]
(second break)
- [CheckRegController init]
- [NSDocumentController makeUntitledDocumentOfType:]
I suppose it has a tiny memory leak because there is always one more init then
there is dealloc. When there is a memory leak in an app and the app is
"Quit" is all of the wasted memory avilable again, or is a restart
necessary? I think I know the anwswer, but I am not sure.
Sorry for the Newbie questions. I am just a student at Arizona State
University.
Rick Heywood
email@hidden
God bless America!!!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.