Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368341

Summary: Many ComposedAdapterFactory instantiations without disposal
Product: [Modeling] EMFStore Reporter: Nikolay Kasyanov <corrmage>
Component: CommonAssignee: Maximilian Koegel <mkoegel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emueller, jhelming, mkoegel
Version: unspecified   
Target Milestone: 0.9.3.M6   
Hardware: All   
OS: All   
Whiteboard:

Description Nikolay Kasyanov CLA 2012-01-11 08:56:03 EST
I've found that ComposedAdapterFactory instantiated in many places, but not disposed later. It may result in item provider leaks.
May be it would be nice to create one global instance of ComposedAdapterFactory, and use it everywhere.
Comment 1 Maximilian Koegel CLA 2012-01-12 10:04:33 EST
Thank you for pointing this out, we had this problem before, it still seems to be present!
Comment 2 Franziska Haunolder CLA 2012-01-17 08:27:44 EST
added ComposedAdapterFactory.dispose() where needed!
Comment 3 Maximilian Koegel CLA 2012-01-24 10:46:09 EST
approved
Comment 4 Maximilian Koegel CLA 2012-01-24 10:46:15 EST
approved
Comment 5 Nikolay Kasyanov CLA 2012-02-04 03:25:46 EST
More issues:
org.eclipse.emf.emfstore.client.ui.dialogs.login.ServerInfoSelectionDialog:109
org.eclipse.emf.emfstore.client.ui.dialogs.merge.util.DecisionUtil:35
org.eclipse.emf.emfstore.client.ui.views.emfstorebrowser.dialogs.admin.PropertiesComposite:477
org.eclipse.emf.emfstore.client.ui.views.emfstorebrowser.provider.ESBrowserContentProvider:33
org.eclipse.emf.emfstore.client.ui.views.emfstorebrowser.provider.ESBrowserLabelProvider:32
org.eclipse.emf.emfstore.client.ui.views.historybrowserview.HistoryTableContentProvider:31
org.eclipse.emf.emfstore.client.ui.views.historybrowserview.HistoryTableLabelProvider:36

All credits goes to JDT's Java Search :)
Comment 6 Edgar Mueller CLA 2012-10-31 06:33:13 EDT
I've moved the instantiation of the ComposedAdapterFactory into the Activator of the the client.ui plugin.  The factory is disposed upon Activator#stop.  
 Note that DecisionUtil did not own a ComposedAdapterFactory anymore and the HistoryTableContentProvider and HistoryTableLabelProvider classes have been removed, all other occurences of ComposedAdapterFactorys thus have been replaced with a getter.