Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndrew Gvozdev2011-07-15 10:38:50 -0400
committerAndrew Gvozdev2011-07-15 10:46:17 -0400
commit63f72f39e12c968bbfe3ec7c158de43936ec48de (patch)
treeeb8bc58612ded231d84e3e1b3516b0af05e7853c /core
parent76a0e8f46ed5f4818e93e134a471755c20446bee (diff)
downloadorg.eclipse.cdt-63f72f39e12c968bbfe3ec7c158de43936ec48de.tar.gz
org.eclipse.cdt-63f72f39e12c968bbfe3ec7c158de43936ec48de.tar.xz
org.eclipse.cdt-63f72f39e12c968bbfe3ec7c158de43936ec48de.zip
bug 333001: Description Scanner Info doesn't release
ICProjectDescription
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java
index 6f6eae2dbc..c23c8f9e6b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java
@@ -278,6 +278,20 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
public void projectClosedRemove(IProject project) {
CProjectDescriptionStorageManager.getInstance().projectClosedRemove(project);
+ disposeAssociatedListeners(project);
+ }
+
+ private void disposeAssociatedListeners(IProject project) {
+ List<ScannerInfoProviderProxy> proxyListeners = new ArrayList<ScannerInfoProviderProxy>();
+ for (ListenerDescriptor ldescriptor : fListeners) {
+ if (ldescriptor.fListener instanceof ScannerInfoProviderProxy)
+ proxyListeners.add((ScannerInfoProviderProxy) ldescriptor.fListener);
+ }
+ // avoid calling proxy.close() inside fListeners loop as it modifies the collection
+ for (ScannerInfoProviderProxy proxy : proxyListeners) {
+ if (project.equals(proxy.getProject()))
+ proxy.close();
+ }
}
/**

Back to the top