Second Window Leak
Second Window Leak
- Subject: Second Window Leak
- From: Chris Outwin <email@hidden>
- Date: Sun, 19 Mar 2006 21:02:53 -0600
I have a leak which I haven't seen covered in the archives or Google.
My Cocoa, non-document app has a second window (a NSPanel) controlled
by a NSWindowController subclass.  This controller is created in a
class method as a static object.  Its init method calls self = [self
initWithWindowNibName:@"ToolPalette"];  The controller is the Nib
file owner and has its window outlet connected.  The panel has its
delegate outlet connected to the file owner.
When I drag a NSImageView on to the panel, MallocDebug reports a 12
byte leak.  If I remove the NSImageView and drag other IB objects on
to the panel, some leaks; others don't.  For example:
NSColorWell		No leak
NSTabView		12 byte leak
NSTextField		12 byte leak
NSTableView	No leak
NSSlider                No leak
NSMatrix		12 byte leak
The documentation in What Happens When a Nib File is Loaded says,
"Note that NSWindowController automatically releases its nib file’s
objects for you."  I created a test app which just opens an
additional panel, and tested the above IB elements one at a time.
They leak as noted.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden