Memory leak with NSPopupButton menu loaded from nib
Memory leak with NSPopupButton menu loaded from nib
- Subject: Memory leak with NSPopupButton menu loaded from nib
- From: Peter Lennie <email@hidden>
- Date: Sat, 29 May 2004 12:08:23 -0400
I have run into what appears to be a major leak problem with NSMenus
attached to NSPopupButtons instantiated from nibs.
My app uses several nib files each of which has a window containing a
variable numbers of views (including several instances of
NSPopupButton). Each nib is managed by a window controller and its
window and views are loaded through a call to initWithWindowNibName.
The window is released when the window controller is closed.
ObjectAlloc shows that the window and all its associated objects are
released *except* the NSMenus (and objects that belong to them) that
were attached to the popupbuttons. My code does nothing that I know
of to retain any of these.
This behavior is completely consistent in all nib files that I load
and dispose of this way. I'm using the 10.2 and later nib format, and
compiling and running under 10.3.4, though as far as I can tell the
problem affects all versions of Panther.
Is this a known bug, and does anyone know a way around it? Or is
there something special one is supposed to do to make sure menus are
released? Help appreciated.
Peter Lennie
--
_____________________________
Peter Lennie
Center for Neural Science Phone: (212) 998-3530
New York University Fax: (212) 995-4011
2-4 Washington Place Web:
http://www.cns.nyu.edu/
New York, NY 10003
_______________________________________________
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.