Project: JDT
Bug 188485 [package explorer] image leaked when opening toolbar menu in package explorer
Reported: 2007-05-22 17:51:30 | Status: verified fixed

Build: I20070522-0010 1) Open the drop-down menu in the package explorer's tool bar (the little triangle). 2) Hit Esc to close the menu. -> One image is leaked each time. This is the image for the "Window Working Set" item in the menu. The same leak occurs in the menu for the Projects/Packages/Types views in the Java Browsing perspective. While the leak occurs in the JDT UI class WorkingSetMenuContributionItem, I'm logging in platform UI because it looks like the image is correctly disposed in the contribution item's dispose method. Here is a sample stack trace from Sleak: java.lang.Error at java.lang.Throwable.<init>(Throwable.java:56) at org.eclipse.swt.graphics.Device.new_Object(Device.java:787) at org.eclipse.swt.graphics.Image.<init>(Image.java:491) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:289) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:227) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:205) at org.eclipse.jdt.internal.ui.workingsets.WorkingSetMenuContributionItem.fill(WorkingSetMenuContributionItem.java:69) at org.eclipse.jface.action.MenuManager.update(MenuManager.java:665) at org.eclipse.ui.internal.ViewPane$PaneMenuManager.update(ViewPane.java:97) at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:395) at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:390) at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:416) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CategoryFilterActionGroup.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/CommonLayoutActionGroup.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetFilterActionGroup.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetShowActionGroup.java