Bug 337002 EPartService leaks previously active part
A reference is kept to the previously active part. This is unnecessary. We only need it to fire events. After the deactivation events have been fired, we should no longer need to keep it lying around.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
testSavePart_NoHandler(true, true, true);
	}
	public void testSavePart_NoHandler_TTF() {
		testSavePart_NoHandler(true, true, false);
	}
	public void testSavePart_NoHandler_TFT() {
		testSavePart_NoHandler(true, false, true);
	}
	public void testSavePart_NoHandler_TFF() {
		testSavePart_NoHandler(true, false, false);
	}
	public void testSavePart_NoHandler_FTT() {
		testSavePart_NoHandler(false, true, true);
	}
	public void testSavePart_NoHandler_FTF() {
		testSavePart_NoHandler(false, true, false);
	}
	public void testSavePart_NoHandler_FFT() {
		testSavePart_NoHandler(false, false, true);
	}
	public void testSavePart_NoHandler_FFF() {
		testSavePart_NoHandler(false, false, false);
	}
	private MPart createSaveablePart(
			MElementContainer<MWindowElement> container, boolean beforeDirty) {
		MPart saveablePart = BasicFactoryImpl.eINSTANCE.createPart();
		saveablePart.setDirty(beforeDirty);
		saveablePart
				.setContributionURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.application.ClientEditor");
		container.getChildren().add(saveablePart);