Bug 44827 [Viewers] StructuredViewer's UpdateItemSafeRunnable holds onto last selected element-memory leak
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.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
* @return a viewer sorter, or <code>null</code> if none
 */
public ViewerSorter getSorter() {
	return sorter;
}
/**
 * Handles a double-click select event from the widget.
 * <p>
 * This method is internal to the framework; subclassers should not call
 * this method.
 * </p>
 *
 * @param event the SWT selection event
 */
protected void handleDoubleSelect(SelectionEvent event) {
	
	Control control = getControl();
	if (control != null && !control.isDisposed()) {
		ISelection selection = getSelection();
		updateSelection(selection);
		fireDoubleClick(new DoubleClickEvent(this, selection));
	}
}
/**
 * Handles an open event from the OpenStrategy.
 * <p>
 * This method is internal to the framework; subclassers should not call
 * this method.
 * </p>
 *