Community
Participate
Working Groups
M6 - ensure you have a java project in your workspace - in the Java perspective, invoke Run -> Run... - select tree item Java Applet, press New - in the new tab folder go to the Classpath tab - select User Entries - press Add Projects... - check one or more projects in the subsequent dialog, OK - a new item is added as a child of User Entries, this new item is the one whose Image is being leaked Here's a trace of the Image's creation: at org.eclipse.swt.graphics.Device.new_Object(Device.java:648) at org.eclipse.swt.graphics.Image.<init>(Image.java:629) at org.eclipse.jface.resource.ImageDescriptor.createImage (ImageDescriptor.java:135) at org.eclipse.jface.resource.ImageDescriptor.createImage (ImageDescriptor.java:94) at org.eclipse.jface.resource.ImageDescriptor.createImage (ImageDescriptor.java:83) at org.eclipse.ui.model.WorkbenchLabelProvider.getImage (WorkbenchLabelProvider.java:129) at org.eclipse.jdt.internal.debug.ui.launcher.RuntimeClasspathEntryLabelProvider.ge tImage(RuntimeClasspathEntryLabelProvider.java:59) at org.eclipse.jdt.internal.debug.ui.classpath.ClasspathLabelProvider.getImage (ClasspathLabelProvider.java:37) at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:99) at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run (AbstractTreeViewer.java:87) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:813) at org.eclipse.core.runtime.Platform.run(Platform.java:457) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem (AbstractTreeViewer.java:469) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run (StructuredViewer.java:119) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:813) at org.eclipse.core.runtime.Platform.run(Platform.java:457) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1285) at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem (AbstractTreeViewer.java:383) at org.eclipse.jface.viewers.AbstractTreeViewer$1.run (AbstractTreeViewer.java:363) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren (AbstractTreeViewer.java:349) at org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedState (AbstractTreeViewer.java:1347) at org.eclipse.jdt.internal.debug.ui.classpath.ClasspathContentProvider.add (ClasspathContentProvider.java:44) at org.eclipse.jdt.internal.debug.ui.classpath.RuntimeClasspathViewer.addEntries (RuntimeClasspathViewer.java:120) at org.eclipse.jdt.internal.debug.ui.actions.AddProjectAction.run (AddProjectAction.java:128) at org.eclipse.jdt.internal.debug.ui.actions.RuntimeClasspathAction$1.widgetSelecte d(RuntimeClasspathAction.java:137) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2318) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1999) at org.eclipse.jface.window.Window.runEventLoop(Window.java:586) at org.eclipse.jface.window.Window.open(Window.java:566) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.op en(LaunchConfigurationsDialog.java:440) at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:390) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup (DebugUITools.java:394) at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup (DebugUITools.java:336) at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run (OpenLaunchDialogAction.java:79) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:509) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:461) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent (ActionContributionItem.java:408) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2318) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1999) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1506) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1482) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:246) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581)
I can't make this happen. When I step through the code, the image is disposed. The label provider is disposed on the viewer's dispose callback.
Please verify, Darin (S).
Note that I still see this in the 0129 integration build.
I am just not getting to this one...
Deferred (yet again)
Using OptimizeIt on I20040330, I see an Image that is not disposed but as DarinW indicated it looks like the code is doing the right thing.
You can reproduce the problem just by having a Project entry...or any entry that eventually deferred to the WorkbenchLabelProvider of the RuntimeClasspathEntryLabelProvider of the ClasspathLabelProvider. The ClasspathLabelProject was not disposing the RuntimeClasspathEntryLabelProvider it created. Therefore any images created by the WorkbenchLabelProvider were not disposed. Fixed in ClasspathLabelProvider.
Please verify DarinW.
Verified.