Commit affba44c authored by Simon Barner's avatar Simon Barner
Browse files

- Do not postpone cleanup of GC until TreeViewerFirstColumnLabelProvider is garbage collected

- Instead, install dispose listener on allocation table editor
refs 2950
parent 6ca96a11
......@@ -6,5 +6,5 @@ ParameterTableTreeViewerManager.java 00b54e90f06f218020239f144e7b950dc75bc1d4 YE
TreeViewerCheckBoxEditingSupport.java ae801bf9e495b983774224444549cfc8c26fee58 GREEN
TreeViewerCheckBoxLabelProvider.java 4ef8bf1d20be01aaf9e62db25a25e48f3954bebf GREEN
TreeViewerContentProvider.java 6b97e361c3c8a633eb29963d44f7d4b3a9b9089a GREEN
TreeViewerFirstColumnLabelProvider.java 667f74dd10c1eebfb62976f846ff555b9da77988 GREEN
TreeViewerFirstColumnLabelProvider.java 081fe73f5ec7b6ace748f5582fd263f2b83a1432 YELLOW
TreeViewerManager.java 27441577968f9650d75625acf9b5691846f90640 YELLOW
......@@ -26,6 +26,8 @@ import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.TreeViewerColumn;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
......@@ -72,13 +74,14 @@ public class TreeViewerFirstColumnLabelProvider<T extends AllocationTable> exten
this.column = column;
gc = new GC(treeViewer.getTree());
}
/** {@inheritDoc} */
@Override
protected void finalize() throws Throwable {
gc.dispose();
super.finalize();
allocationTableEditor.getGUI().addDisposeListener(new DisposeListener() {
/** {@inheritDoc} */
@Override
public void widgetDisposed(DisposeEvent e) {
gc.dispose();
}
});
}
/** {@inheritDoc} */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment