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
/******************************************************************************* 
 * Copyright (c) 2000, 2003 IBM Corporation and others. 
 * All rights reserved. This program and the accompanying materials! 
 * are made available under the terms of the Common Public License v1.0 
 * which accompanies this distribution, and is available at 
 * http://www.eclipse.org/legal/cpl-v10.html 
 * 
 * Contributors: 
 *        IBM Corporation - initial API and implementation 
 ******************************************************************************/package org.eclipse.jface.viewers;
import java.util.ArrayList;
import java.util.Iterator;