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:
parent
3f68cfad81
commit
5113a88ad7
3 changed files with 18 additions and 8 deletions
|
@ -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
|
||||||
|
|
|
@ -384,14 +384,15 @@ 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
|
}
|
||||||
// For example the CProject needs to destroy the BinaryContainer and ArchiveContainer
|
|
||||||
if (celement instanceof CElement) {
|
// Make sure any object specifics not part of the children be destroy
|
||||||
try {
|
// For example the CProject needs to destroy the BinaryContainer and ArchiveContainer
|
||||||
((CElement)celement).closing(info);
|
if (celement instanceof CElement) {
|
||||||
} catch (CModelException e) {
|
try {
|
||||||
//
|
((CElement)celement).closing(info);
|
||||||
}
|
} catch (CModelException e) {
|
||||||
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue