Bug 307122 SelectionServiceImpl leaks RATs
SelectionServiceImpl.track adds an IRunAndTrack that is never removed. So for example each time an editor is opened and closed two extra RATs are added to the application context (once for open and once for close).
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/SelectionServiceImpl.java
static final String OUT_SELECTION = "output.selection"; 
	private Set<ISelectionListener> genericListeners = new HashSet<ISelectionListener>();
	private Map<String, Set<ISelectionListener>> targetedListeners = new HashMap<String, Set<ISelectionListener>>();
	private Set<IEclipseContext> tracked = new HashSet<IEclipseContext>();
	@Inject
	private IEclipseContext context;
	@Inject
	private EPartService partService;
	/**
	 * This is the specific implementation. TODO: generalize it
	 */
	@Inject
	@Named(EPartService.PART_SERVICE_ROOT)
	private MContext serviceRoot;
	@Inject
	private IEventBroker eventBroker;
	private EventHandler eventHandler = new EventHandler() {
		public void handleEvent(Event event) {
			Object element = event.getProperty(UIEvents.EventTags.ELEMENT);
			if (element instanceof MPart) {
				MPart part = (MPart) element;
				IEclipseContext context = part.getContext();
				if (context != null && isInContainer(part)) {
					track(part);
				}
			}
		}
	};
	private MPart activePart;
	@PreDestroy