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
}
/**
 * Handles a post select event from the widget.
 * <p>
 * This method is internal to the framework; subclassers should not call
 * this method.
 * </p>
 *
 * @param event the SWT selection event
 */
protected void handlePostSelect(SelectionEvent e) {
	SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
	firePostSelectionChanged(event);
}
/* (non-Javadoc)
 * Method declared on Viewer.
 */
protected void hookControl(Control control) {
	super.hookControl(control);
	OpenStrategy handler = new OpenStrategy(control);
	handler.addSelectionListener(new SelectionListener() {
		public void widgetSelected(SelectionEvent e) {
			handleSelect(e);
		}
		public void widgetDefaultSelected(SelectionEvent e) {
			handleDoubleSelect(e);
		}
	});
	handler.addPostSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {