Re: Memory leak with NSPopupButton menu loaded from nib
Re: Memory leak with NSPopupButton menu loaded from nib
- Subject: Re: Memory leak with NSPopupButton menu loaded from nib
- From: Chuck Fleming <email@hidden>
- Date: Sat, 29 May 2004 18:01:00 -0700
Hi,
So far I've had no luck reproducing this using the steps you've
described below. I'm running on post-Panther code, so this could be a
bug that has been fixed. Could you send a simple project where you see
the leaks?
Thanks,
Chuck
On May 29, 2004, at 4:55 PM, Peter Lennie wrote:
I did what you did and got the result you did. Puzzled, I looked at
the default format of the nib. It was pre 10.2. Change the nib file
format to 10.2 and later, and the menu leaks I described appear
immediately.
PL
At 11:39 AM -0700 5/29/04, Chuck Fleming wrote:
Hi,
I'm not able to reproduce this at least with the stock Xcode
document-based application template and populating the MyDocument.nib
with several NSPopupButtons. Running leaks with MallocStackLogging
turned on doesn't indicate any NSMenus leaking after opening and
closing documents.
Chuck
On May 29, 2004, at 9:08 AM, Peter Lennie wrote:
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.
_______________________________________________
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.
_______________________________________________
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.