Bug 72024 UndoManager creates potential memory leak [refactoring]
3.0 The refactoring undo manager doesn't call dispose in all cases where a undo/redo object is no longer needed. This can result in a memory leak since the undo/redo object could register for listeners and therefore relies on the fact the dispose is called correctly. Cases where dispose isn't called: - if the undo stack reaches it maximum number of change objects and the last one is removed from the stack. - if the undo/redo stack gests flushed and one of the change objects causes an exception during sending dispose. - if the undo/redo object isn't valid anymore and can therefore not be executed.
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoManager.java
fUndoNames= new Stack();
		fireUndoStackChanged();
	}
	private void flushRedo() {
		if (fRedoChanges != null) {
			sendDispose(fRedoChanges);
		}
		fRedoChanges= new Stack();
		fRedoNames= new Stack();
		fireRedoStackChanged();
	}
	/*
	 * (Non-Javadoc) Method declared in IUndoManager.
	 */
	public void addUndo(String refactoringName, Change change) {
		Assert.isNotNull(refactoringName, "refactoring"); 
		Assert.isNotNull(change, "change"); 
		fUndoNames.push(refactoringName);
		fUndoChanges.push(change);
		if (fUndoChanges.size() > MAX_UNDO_REDOS) {
			fUndoChanges.remove(0);
			fUndoNames.remove(0);
		}
		flushRedo();
		fireUndoStackChanged();
	}
	/*
	 * (Non-Javadoc) Method declared in IUndoManager.
	 */
	public void performUndo(IValidationCheckResultQuery query, IProgressMonitor pm) throws CoreException {