Project: Eclipse_Platform_UI
Bug 158016 [Perspectives] GDI leak: Each time you create a perspective switcher an image is leaked
Reported: 2006-09-20 11:59:31 | Status: resolved fixed

To recreate. Open a new perspective and close it. Notice your GDIs increase by 1 each time you do this. The PerspectiveSwitcher creates a PerspectiveBarManager but doesn't dispose it. The PerspectiveBarNewContributionItem does implement a dispose() method that does the right thing, but the method is never called. The following patch disposes the PerspectiveBarManager when the PerspectiveSwitcher is disposed.

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