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
}
/**
 * Notifies any double-click listeners that a double-click has been received.
 * Only listeners registered at the time this method is called are notified.
 *
 * @param event a double-click event
 *
 * @see IDoubleClickListener#doubleClick
 */
protected void fireDoubleClick(final DoubleClickEvent event) {
	Object[] listeners = doubleClickListeners.getListeners();
	for (int i = 0; i < listeners.length; ++i) {
		final IDoubleClickListener l = (IDoubleClickListener)listeners[i];
		Platform.run(new SafeRunnable() {
			public void run() {
				l.doubleClick(event);
			}
			public void handleException(Throwable e) {
				super.handleException(e);
				
				
				removeDoubleClickListener(l);
			}
		});			
	}
}
/**
 * Notifies any open event listeners that a open event has been received.
 * Only listeners registered at the time this method is called are notified.
 *