CommandContributionItem is never disposed when it's placed at drop down menu from toolbar item. [message #653023] |
Tue, 08 February 2011 02:58 |
|
<extension point="org.eclipse.ui.menus">
<menuContribution allPopups="false" locationURI="toolbar:test">
<command commandId="org.eclipse.ui.help.aboutAction" id="test-dropdown-menu-id" style="pulldown" />
</menuContribution>
<menuContribution allPopups="false" locationURI="menu:test-dropdown-menu-id">
<command commandId="org.eclipse.ui.help.quickStartAction" style="push" />
</menuContribution>
</extension>
1. I created Toolbar manager manually and give it "toobar:test" as location.
2. Put a command contribution into toolbar with drop down style, and give it some id to place another command on it.
3. Put a another command contribution into given menu id.
4. place breakpoint at CommandContribution#dispose()
5. dispose my toolbar. (closing view).
6. aboutAction was disposed but quickStartAction. (red)
Command Contribution retains handler service and execution context which refers active editor and selection.
It causes huge leak problems.
What did I do wrong?
Thanks for reading.
Addition:
CommandContiributionItem#openDropDownMenu() seems to reason.
There is no releasing or disposing for menu manager.
[Updated on: Tue, 08 February 2011 04:04] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03377 seconds