Community
Participate
Working Groups
RAP leaks when using a trim control contribution: <menuContribution locationURI="toolbar:org.eclipse.ui.trim.status"> <toolbar id="mytoolbar"> <control class="org.example.MyControlContribution"> </control> </toolbar> </menuContribution> The actual contribution (subclass of WorkbenchWindowControlContribution) may be as simple as a Label. When a Workbench starts, it creates an org.eclipse.ui.internal.activities.Identifier instance for the contribution. The Identifier instance is the written to the static member "strongReferences" (defined in org.eclipse.ui.internal.activities.Identifier). When the workbench closes these Identifier instances are being removed from the strongReferences collection (usually by a method called unregisterVisibleWhen() that disposes an identifierListener). But not in the case of trim contributions. For these, the Identifier instance remains in the strongReferences collection and causes the Workbench including Windows, Shells and so on to remain on the heap.