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
partStack.getChildren().add(partC);
		partStack.setSelectedElement(partC);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = window.getContext().get(EPartService.class);
		partService.activate(partA);
		assertEquals(partA, partService.getActivePart());
		partService.switchPerspective(perspectiveB);
		assertEquals(partA, partService.getActivePart());
		MPart partD = BasicFactoryImpl.eINSTANCE.createPart();
		partStack.getChildren().add(partD);
		partService.showPart(partD, PartState.ACTIVATE);
		assertEquals(partD, partStack.getSelectedElement());
		assertEquals(partD, partService.getActivePart());
		partService.hidePart(partD);
		assertEquals(partC, partStack.getSelectedElement());
		assertEquals(partA, partService.getActivePart());
	}
	/**
	 * Test to ensure that the active part remains constant between perspective
	 * switches.
	 */
	public void testActivationHistory01() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(partA);