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.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizard.java
} else { 
				Assert.isTrue(getPageCount() == 0);
				addUserInputPages();
				fUserInputPages= getPageCount();
				if (fUserInputPages > 0) {
					IWizardPage[] pages= getPages();
					((UserInputWizardPage)pages[fUserInputPages - 1]).markAsLastUserInputPage();
				}
				if (fUserInputPages > 1) {
					Assert.isTrue((fFlags & WIZARD_BASED_USER_INTERFACE) != 0);
				}
				addErrorPage();
				addPreviewPage();	
			}
			initializeDefaultPageTitles();
		} finally {
			fInAddPages= false;
		}
	}
	
	/**
	 * {@inheritDoc}
	 * 
	 * This method asserts that the pages added to the refactoring wizard
	 * are instances of type {@link RefactoringWizardPage}.
	 */
	public final void addPage(IWizardPage page) {
		Assert.isTrue(page instanceof RefactoringWizardPage && fInAddPages);
		super.addPage(page);
	}