- tighten up code.. ensure pointers set to null after delete, etc

This commit is contained in:
Mark Vejvoda
2013-02-01 17:25:49 +00:00
parent bff9b1b3bc
commit 8dc637527a
19 changed files with 54 additions and 13 deletions

View File

@@ -473,6 +473,7 @@ XmlTree::~XmlTree() {
}
delete rootNode;
rootNode=NULL;
}
// =====================================================
@@ -574,9 +575,11 @@ XmlNode::~XmlNode() {
for(unsigned int i=0; i<children.size(); ++i) {
delete children[i];
}
children.clear();
for(unsigned int i=0; i<attributes.size(); ++i) {
delete attributes[i];
}
attributes.clear();
}
XmlAttribute *XmlNode::getAttribute(unsigned int i) const {