Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368341 - Many ComposedAdapterFactory instantiations without disposal
Summary: Many ComposedAdapterFactory instantiations without disposal
Status: RESOLVED FIXED
Alias: None
Product: EMFStore
Classification: Modeling
Component: Common (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.3.M6   Edit
Assignee: Maximilian Koegel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 08:56 EST by Nikolay Kasyanov CLA
Modified: 2012-10-31 06:33 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.