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 2004-04-15 Alain Magloire
Fix for PR 58481 Fix for PR 58481

View file

@ -384,6 +384,8 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
for (int i = 0; i < children.length; i++) { for (int i = 0; i < children.length; i++) {
releaseCElement(children[i]); releaseCElement(children[i]);
} }
}
// Make sure any object specifics not part of the children be destroy // Make sure any object specifics not part of the children be destroy
// For example the CProject needs to destroy the BinaryContainer and ArchiveContainer // For example the CProject needs to destroy the BinaryContainer and ArchiveContainer
if (celement instanceof CElement) { if (celement instanceof CElement) {
@ -393,7 +395,6 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
// //
} }
} }
}
// If an entire folder was deleted we need to update the // If an entire folder was deleted we need to update the
// BinaryContainer/ArchiveContainer also. // BinaryContainer/ArchiveContainer also.

View file

@ -126,9 +126,11 @@ public class DeltaProcessor {
} }
// It is not a C resource if the parent is a Binary/ArchiveContainer // 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) { if (celement != null && resource.getType() == IResource.FILE) {
ICElement parent = celement.getParent(); ICElement parent = celement.getParent();
if (parent instanceof IArchiveContainer || parent instanceof IBinaryContainer) { if (parent instanceof IArchiveContainer || parent instanceof IBinaryContainer) {
releaseCElement(celement);
celement = null; celement = null;
} }
} }