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
partService.hidePart(partB);
			assertEquals(partC, partService.getActivePart());
		} else if (activePart == partC) {
			partService.hidePart(partC);
			assertEquals(partB, partService.getActivePart());
		} else if (activePart == partA) {
			fail("Part A should have been deactivated");
		} else {
			fail("Another part should have been activated");
		}
	}
	public void testHidePart_ActivationHistory12() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MArea area = AdvancedFactoryImpl.eINSTANCE.createArea();
		window.getSharedElements().add(area);
		MPerspectiveStack perspectiveStack = AdvancedFactoryImpl.eINSTANCE
				.createPerspectiveStack();
		window.getChildren().add(perspectiveStack);
		window.setSelectedElement(perspectiveStack);
		MPerspective perspective = AdvancedFactoryImpl.eINSTANCE
				.createPerspective();
		perspectiveStack.getChildren().add(perspective);
		perspectiveStack.setSelectedElement(perspective);
		MPartStack stackA = BasicFactoryImpl.eINSTANCE.createPartStack();
		perspective.getChildren().add(stackA);
		perspective.setSelectedElement(stackA);