Project: Eclipse_Platform_UI
Bug 44827 [Viewers] StructuredViewer's UpdateItemSafeRunnable holds onto last selected element-memory leak
Reported: 2003-10-14 11:58:37 | Status: resolved fixed

I have a TableViewer that normally displays a list of objects. I clear the list by calling TableViewer.setInput(null). I found that if I initially have a list of objects, select an object, then setInput(null) the TableViewer is still holding onto an instance of the object I last selected. More specifically, it looks like StructuredViewer's UpdateItemSafeRunnable is holding onto the object. The UpdateItemSafeRunnable object should be cleared out after its use.

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java