• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Memory leak with NSPopupButton menu loaded from nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 11:39:08 -0700

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.

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.
_______________________________________________
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.


  • Follow-Ups:
    • Re: Memory leak with NSPopupButton menu loaded from nib
      • From: Peter Lennie <email@hidden>
References: 
 >Memory leak with NSPopupButton menu loaded from nib (From: Peter Lennie <email@hidden>)

  • Prev by Date: [Moderator] Re: window rotation
  • Next by Date: Help with NSAffineTransform?
  • Previous by thread: Memory leak with NSPopupButton menu loaded from nib
  • Next by thread: Re: Memory leak with NSPopupButton menu loaded from nib
  • Index(es):
    • Date
    • Thread