bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenu


From: Fred Kiefer
Subject: Re: NSMenu
Date: Wed, 04 Feb 2004 23:17:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

Quentin Mathé wrote:
NSMenuItem autoenabling doesn't work with NSPopUpButton... is it an unimplemented feature ?

other problem... with the code below :

NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
[NSMenu popUpContextMenu:menu withEvent:myEvent forView:myView];
RELEASE(menu);

the menu object doesn't seem to be released (its dealloc method is not called)... Why ?


This seems to eb a real bug, so lets move teh discussion to this mailing list.

My impression after a short inspection is that the problem comes from the fact that a menu allways registers itself with the notification centre, which in turn will keep a reference to the object thereby keeping it alive. But I might be wrong here, as many classes in GUI use a similar pattern and would thereby be living longer than expected. Coudl somebody with mre knowledge of the implementation of NSNotificationCenter comment on this?

Than this problem would even exist in the above code if the menu is only created and released later. Is this true?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]