mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
bug 333001: Description Scanner Info doesn't release
ICProjectDescription
This commit is contained in:
parent
76a0e8f46e
commit
63f72f39e1
1 changed files with 14 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue