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
* The default implementation of this method returns <code>null</code>.
 * </p>
 *
 * @param x horizontal coordinate
 * @param y vertical coordinate
 * @return the item, or <code>null</code> if there is no item at the
 *  given coordinates
 */
protected Item getItem(int x, int y) {
	return null;
}
/**
 * Returns the children of the given parent without sorting and 
 * filtering them.  
 * The resulting array must not be modified,
 * as it may come directly from the model's internal state.
 * <p>
 * Returns an empty array if the given parent is <code>null</code>.
 * </p>
 *
 * @param parent the parent element
 * @return the child elements
 */
protected Object[] getRawChildren(Object parent) {
	Object[] result = null;
	if (parent != null) {
		IStructuredContentProvider cp = (IStructuredContentProvider) getContentProvider();
		if (cp != null) {
			result = cp.getElements(parent);
			Assert.isNotNull(result);