1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Binary/ArchiveContainer was not clean up

This commit is contained in:
Alain Magloire 2004-04-16 03:30:13 +00:00
parent 3f68cfad81
commit 5113a88ad7
3 changed files with 18 additions and 8 deletions

View file

@ -1,3 +1,10 @@
2004-04-15 Alain Magloire
BinaryContainer was not cleaned up.
* model/org/eclipse/cdt/internal/core/model/CModelManager.java
* model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java
2004-04-15 Alain Magloire
Fix for PR 58481

View file

@ -384,14 +384,15 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
for (int i = 0; i < children.length; i++) {
releaseCElement(children[i]);
}
// Make sure any object specifics not part of the children be destroy
// For example the CProject needs to destroy the BinaryContainer and ArchiveContainer
if (celement instanceof CElement) {
try {
((CElement)celement).closing(info);
} catch (CModelException e) {
//
}
}
// Make sure any object specifics not part of the children be destroy
// For example the CProject needs to destroy the BinaryContainer and ArchiveContainer
if (celement instanceof CElement) {
try {
((CElement)celement).closing(info);
} catch (CModelException e) {
//
}
}

View file

@ -126,9 +126,11 @@ public class DeltaProcessor {
}
// It is not a C resource if the parent is a Binary/ArchiveContainer
// But we have to release too.
if (celement != null && resource.getType() == IResource.FILE) {
ICElement parent = celement.getParent();
if (parent instanceof IArchiveContainer || parent instanceof IBinaryContainer) {
releaseCElement(celement);
celement = null;
}
}