Bug 186025 [Viewers] Virtual Manager should be cleared when Viewer is disposed
Got a nasty memory leak where the Workbench would keep my disposed viewer in a field since it was registered as a selection provider. In StructuredViewer#handleDisposed(), the input is set to null, however this does not clear a possible virtual manager being used from the Table Viewer. The Table Viewer should clear the cache of the virtual manager on handleDispose to make sure, no reference to any model object is retained.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTableViewer.java
int selectionIndex = selectionIndices[i];
				if (selectionIndex < virtualManager.cachedElements.length) {
					element = virtualManager.cachedElements[selectionIndex];
				}
				if (element == null) {
					
					Item item = doGetItem(selectionIndex);
					element = item.getData();
				}
				if (element != null) {
					result.add(element);
				}
			}
		}
		return result;
	}
	/**
	 * @param element
	 *            the element to insert
	 * @return the index where the item should be inserted.
	 */
	protected int indexForElement(Object element) {
		ViewerComparator comparator = getComparator();
		if (comparator == null) {
			return doGetItemCount();
		}
		int count = doGetItemCount();
		int min = 0, max = count - 1;
		while (min <= max) {
			int mid = (min + max) / 2;