Community
Participate
Working Groups
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.
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.
Please verify, Darin
Verified.