Bug 25907 - [ExternalTools] ExternalToolMenuDelegate leaking menus
Summary: [ExternalTools] ExternalToolMenuDelegate leaking menus
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Darin Swanson CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on: 25837
Blocks:
  Show dependency tree
 
Reported: 2002-11-08 13:07 EST by Lynne Kues CLA
Modified: 2002-11-18 14:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lynne Kues CLA 2002-11-08 13:07:05 EST
Build 20021105.

IMenuCreator.getMenu(Control), IMenuCreator.getMenu(Menu) are called everytime 
a the drop down for a menu/tool item is executed.  ExternalToolMenuDelegate 
creates a new menu each time getMenu() is called, but the menu is never 
disposed of.  The action should cache the menu when it is created and dispose 
of the menu when getMenu() is called.  This assumes that the menu needs to be 
recreated each time the drop down occurs.  If not, the menu should just be 
cached and not recreated.

The dispose() method should also dispose of the created menu.  This method will 
be called when the parent widget is disposed.  Currently this is not the case 
(see UI bug report [Bug 25837] IMenuCreator.dispose() is never called), but 
this will be fixed.  Even so, this fix will not solve the above mentioned leak.
Comment 1 Darin Wright CLA 2002-11-15 21:10:07 EST
This is fixed in the new external tools work that uses launch configs. The 
launch history is now generated via the "AbstractLaunchHistoryAction" in the 
debug platform which disposes the previous menu each time a new menu is built.

Comment 2 Darin Wright CLA 2002-11-15 21:10:21 EST
Please verify, Darin
Comment 3 Darin Swanson CLA 2002-11-18 14:21:15 EST
Verified.