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
* Removes the given open listener from this viewer.
 * Has no affect if an identical listener is not registered.
 *
 * @param listener a double-click listener
 */
public void removeOpenListener(IOpenListener listener) {
	openListeners.remove(listener);
}
/* (non-Javadoc)
 * Method declared on IPostSelectionProvider.
 */
public void removePostSelectionChangedListener(ISelectionChangedListener listener) {
	postSelectionChangedListeners.remove(listener);
}
/**
 * Removes the given double-click listener from this viewer.
 * Has no affect if an identical listener is not registered.
 *
 * @param listener a double-click listener
 */
public void removeDoubleClickListener(IDoubleClickListener listener) {
	doubleClickListeners.remove(listener);
}
/**
 * Removes the given filter from this viewer, 
 * and triggers refiltering and resorting of the elements if required.
 * Has no effect if the identical filter is not registered.
 *
 * @param filter a viewer filter
 */