• 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: Must remove submenu when dealloccing NSMenuItem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Must remove submenu when dealloccing NSMenuItem?


  • Subject: Re: Must remove submenu when dealloccing NSMenuItem?
  • From: "stephen joseph butler" <email@hidden>
  • Date: Wed, 21 Feb 2007 22:34:50 -0600

2007/2/21, Jerry Krinock <email@hidden>:
CONCLUSION: I think this indicates a leak in Apple's implementation of
NSMenuItem; possibly that they retain the _submenu as an instance variable,
but don't  set it to nil during -dealloc.  Either that, or they've got a
retain cycle.  Methods -[NSMenuItem menu] and -[NSMenu supermenu], which
refer to what I'd call their "parents" and "grandparents" respectively, have
always worried me a little.

Unfortunately, I can't reproduce the crashes now, but seeing that log of
perfectly matching inits and deallocs sure looks makes me feel a lot better.

Does anyone disagree that this indicates a leak/bug in NSMenuItem?

Can you post some code for how you create these submenus? _______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Must remove submenu when dealloccing NSMenuItem?
      • From: Jerry Krinock <email@hidden>
References: 
 >Must remove submenu when dealloccing NSMenuItem? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Bezier Text Container
  • Next by Date: Re: Must remove submenu when dealloccing NSMenuItem?
  • Previous by thread: Must remove submenu when dealloccing NSMenuItem?
  • Next by thread: Re: Must remove submenu when dealloccing NSMenuItem?
  • Index(es):
    • Date
    • Thread