Re: Must remove submenu when dealloccing NSMenuItem?
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