Re: NSDocument dealloc?
Re: NSDocument dealloc?
- Subject: Re: NSDocument dealloc?
- From: Mark Piccirelli <email@hidden>
- Date: Fri, 21 Sep 2001 22:40:21 -0700
Scott --
If you've really done nothing differently from Sketch, then you've been
led astray by a Sketch bug. Sketch's -makeWindowControllers method was
wrong:
- (void)makeWindowControllers {
SKTDrawWindowController *myController = [[SKTDrawWindowController
allocWithZone:[self zone]] init];
[self addWindowController:myController];
[myController release]; // <--This line was missing!
}
This might be the cause of your leaking document window.
-- Mark
On Sunday, September 16, 2001, at 05:02 AM, Scott Johnson wrote:
Hello,
I have a cocoa application that is based on the document model provided
in Cocoa and my setup is similar to that of the Sketch example (i.e. I
have a custom window controller that manages UI-related activities of
my document window while my document subclass handles data-related
manipulation).
I am uncertain what I have done differently from Sketch (nothing that I
can see) but for some reason my -dealloc method is never called when
the document window is closed. There is only one document window
associated with my document type.
I'd appreciate any tips as to why this is the case.
Regards,
Scott
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev