Community
Participate
Working Groups
20021213 images allocated by at org.eclipse.swt.graphics.Device.new_Object(Unknown Source) at org.eclipse.swt.graphics.Image.<init>(Unknown Source) at org.eclipse.swt.custom.CTabFolder.updateArrowBar(Unknown Source) at org.eclipse.swt.custom.CTabFolder.setButtonBounds(Unknown Source) at org.eclipse.swt.custom.CTabFolder.setItemLocation(Unknown Source) at org.eclipse.swt.custom.CTabFolder.setItemBounds(Unknown Source) at org.eclipse.swt.custom.CTabFolder.onResize(Unknown Source) at org.eclipse.swt.custom.CTabFolder.access$2(Unknown Source) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source) at org.eclipse.swt.custom.CTabFolder.resetTabSize(Unknown Source) at org.eclipse.swt.custom.CTabItem.setImage(Unknown Source) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab(Unknown Source) this line is sometimes different (e.g. updateCloseBar) org.eclipse.swt.custom.CTabFolder.updateArrowBar(Unknown Source) seem to be never disposed test case using Sleak: open a java editor, close the editor SNAP open the java editor again close the editor DIFF there are 6 images altogether - 3 of them are allocated as described above (i'm pretty new to Sleak so maybe this report is bogus) see also bug 28361
There is no leak here. There are three images used by the CTabFolder: arrowLeftImage, arrowRightImage and closeImage These images are used for all tabs (not per tab). Opening an editor and closing an editor will not cause these images to be freed. They will only be freed when the CTabFolder itself is disposed or the images need to be recreated because the size of the tabs has changed. Even when all tabs have been disposed, the CTabFolder itself is not disposed and the images are still around. It would be a waste to dispose the images when there are no tabs and recreate them when the next tab is created since that is done very frequently in eclipse.