Project: Eclipse_Platform_UI
Bug 188467 [GlobalActions] CyclePerspectiveHandler leaks one image per perspective per switch
Reported: 2007-05-22 16:59:36 | Status: verified fixed

Build: I20070522-0010 Each time you hit Ctrl+F8 to switch perspectives, it leaks one image per open perspective (the perspective icon). The CyclePerspectiveHandler#addItems method creates a PerspectiveLabelProvider, but never disposes it. This is a major leak - I typically have three or more perspectives open, and toggle between them with Ctrl+F8 quite frequently. Sleak trace: 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.ui.model.PerspectiveLabelProvider.getImage(PerspectiveLabelProvider.java:83) at org.eclipse.ui.internal.CyclePerspectiveHandler.addItems(CyclePerspectiveHandler.java:48) at org.eclipse.ui.internal.CycleBaseHandler.openDialog(CycleBaseHandler.java:130) at org.eclipse.ui.internal.CycleBaseHandler.execute(CycleBaseHandler.java:107)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CyclePerspectiveHandler.java