Re: menu madness with retain count
Re: menu madness with retain count
- Subject: Re: menu madness with retain count
- From: Greg Guerin <email@hidden>
- Date: Tue, 27 Apr 2010 16:04:19 -0700
Bill Appleton wrote:
3) when i set the menus i have created for NSApp using setMainMenu
then...
what? who owns them? how do i set more menus for NSApp? how do i
get NSApp
to release the current set?
You are not responsible for NSApplication's retention or release of
menus. It alone is responsible for that.
You set more menus for NSApplication by calling its setMainMenu:
method with a different set of menus. That's all you need to know,
and all you need to do. What happens in NSApplication as a result of
calling setMainMenu: is not your responsibility.
To get the current main menu, call NSApplication's mainMenu method.
You could use this to get the current main menu, which you will not
own unless you retain.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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