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
}
	List list = getSelectionFromWidget();
	return new StructuredSelection(list);
}
/**
 * Retrieves the selection, as a <code>List</code>, from the underlying widget.
 *
 * @return the list of selected elements
 */
protected abstract List getSelectionFromWidget();
/**
 * Returns the sorted and filtered set of children of the given element.
 * The resulting array must not be modified,
 * as it may come directly from the model's internal state.
 *
 * @param parent the parent element
 * @return a sorted and filtered array of child elements
 */
protected Object[] getSortedChildren(Object parent) {
	Object[] result = getFilteredChildren(parent);
	if (sorter != null) {
		
		result = (Object[]) result.clone();
		sorter.sort(this, result);
	}
	return result;
}
/**
 * Returns this viewer's sorter, or <code>null</code> if it does not have one.
 *