Bug 264574 ContributedPartFactory: the part created is garbage collected
ContributedPartFactory#createWidget(). Notice this code: Object newPart = contributionFactory.create(...); ContextInjectionFactory.inject(newPart, localContext); and then the newPart goes out of scope and gets garbage collected. This used to work as injection maintained a reference both to context and to the newPart. That reference has been replaced by WeakReference and now on my computer Location gets GC when photo demo starts. (Same applies to all other pieces - Preview, Thumbnails, and so on. I left references to methods/fields in the injection code for now but once I replace those with WeakReferences, as we should, all those parts are going to get GCed too.)
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/renderers/swt/ContributedPartFactory.java
Widget newWidget = null;
		if (part instanceof MContributedPart) {
			final Composite newComposite = new Composite((Composite) parentWidget,
					SWT.NONE);
			newWidget = newComposite;
			bindWidget(part, newWidget);
			final MContributedPart contributedPart = (MContributedPart) part;
			final IHandlerService hs = new PartHandlerService(part);
			final IEclipseContext localContext = EclipseContextFactory.create(
					"ContributedPart", parentContext, UIContextScheduler.instance); 
			IEclipseContext outputContext = EclipseContextFactory.create(
					"ContributedPart-output", null, UIContextScheduler.instance); 
			contributedPart.setContext(localContext);
			localContext.set(Composite.class.getName(), newComposite);
			localContext.set(IHandlerService.class.getName(), hs);
			newComposite.addListener(SWT.Activate, new Listener() {
				public void handleEvent(Event event) {
					activate(part);
				}
			});
			localContext.set(IServiceConstants.OUTPUTS, outputContext);
			localContext.set(IEclipseContext.class.getName(), outputContext);
			Object newPart = contributionFactory.create(contributedPart.getURI(),
					localContext);
			ContextInjectionFactory.inject(newPart, localContext);
		}
		return newWidget;
	}
}