Bug 62097 [Perspectives] Toolbar MenuDetect listeners leaking
When I reset perspective we are leaking ToolBarContributionItem MenuDetect Listeners. STEPS 1) Look at workbench with Optimize It 2) Reset perspective 3) 10 menu detect listeners on items will be left around. Toolbars are not being leaked and we create this listener in ToolBarContributionItem fill(Coolbar,int) using an inner class that we have no reference too. The reference graphs indicates that the Display still has the listener in the event table
bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarContributionItem.java
* Sets the current height of the cool item. Update(SIZE) should be called
     * to adjust the widget.
     * 
     * @param currentHeight
     *            the current height to set
     */
    public void setCurrentHeight(int currentHeight) {
        if (checkDisposed()) {
            return;
        }
        this.currentHeight = currentHeight;
    }
    /**
     * Sets the current width of the cool item. Update(SIZE) should be called
     * to adjust the widget.
     * 
     * @param currentWidth
     *            the current width to set
     */
    public void setCurrentWidth(int currentWidth) {
        if (checkDisposed()) {
            return;
        }
        this.currentWidth = currentWidth;
    }
    /**
     * Sets the minimum number of tool items to show in the cool item. If this
     * number is less than the total tool items, a chevron will appear and the
     * hidden tool items appear in a drop down menu. By default, all the tool
     * items are shown in the cool item.