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
handlePostSelect(e);
		}
	});
	handler.addOpenListener(new IOpenEventListener() {
		public void handleOpen(SelectionEvent e) {
			StructuredViewer.this.handleOpen(e);
		}
	});
}	
/**
 * Returns whether this viewer has any filters.
 */
protected boolean hasFilters() {
	return filters != null && filters.size() > 0;
}
/**
 * Refreshes this viewer starting at the given element.
 *
 * @param element the element
 */
protected abstract void internalRefresh(Object element);
/**
 * Refreshes this viewer starting at the given element.
 * Labels are updated as described in <code>refresh(boolean updateLabels)</code>.
 * <p>
 * The default implementation simply calls <code>internalRefresh(element)</code>,
 * ignoring <code>updateLabels</code>.
 * <p>
 * If this method is overridden to do the actual refresh, then
 * <code>internalRefresh(Object element)</code> should simply