Bug 511014 - Memory leak with context menu items of the text editors

When all items of menuManager need removal when the menu is about to
show (removeAllWhenShown is set to true), the items are removed from the
menu model but not from the MenuManagerRenderer maps.
As result the contributions such as Open With menu item in the context
menu of the text editors are leaking. As the Open With menu is an inner
class it holds a reference to the owning editor and the editor leaks as
well. 
This patch aims to cleanup the MenuManagerRenderer maps -
modelToManager/managerToModel, modelToContribution/contributionToModel
and modelContributionToRecord, when a popup menu is configured to remove
all menu items when shown.

Change-Id: Iadddd21e9792354a270b94067f05cb0e6cf34630
Signed-off-by: Sezgin Halibov <sezgin.halibov@gmail.com>
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
1 file changed
tree: 895e59d6a05fce79b54a1000e52d1a1239e6a6f1
  1. bundles/
  2. examples/
  3. features/
  4. releng/
  5. tests/
  6. .gitignore
  7. CONTRIBUTING.md
  8. pom.xml
  9. README.md
README.md

Contributing to Eclipse Platform UI project

Thanks for your interest in this project.

Project description:

Platform UI provides the basic building blocks for user interfaces built with Eclipse. Some of these form the Eclipse Rich Client Platform (RCP) and can be used for arbitrary rich client applications, while others are specific to the Eclipse IDE. The Platform UI codebase is built on top of the Eclipse Standard Widget Toolkit (SWT), which is developed as an independent project.

Website: http://www.eclipse.org/platform/ui/

For more information, refer to the [Platform UI wiki page] 1.

How to contribute:

Contributions to Platform UI are most welcome. There are many ways to contribute, from entering high quality bug reports, to contributing code or documentation changes. For a complete guide, see the [Platform UI - How to contribute wiki page] 2 page on the team wiki.

How to build on the command line

You need Maven 3.3.1 installed. After this you can run the build via the following command:

mvn clean verify -Pbuild-individual-bundles

Developer resources:

Information regarding source code management, builds, coding standards, and more.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!

Contact:

Contact the project developers via the project's “dev” list.

License

Eclipse Public License (EPL) v1.0