start working through memory bugs

This commit is contained in:
Lee Thomason
2014-12-17 10:41:34 -08:00
parent ee2c46928e
commit cd011bc1b7
3 changed files with 38 additions and 13 deletions

View File

@@ -1334,10 +1334,10 @@ int main( int argc, const char ** argv )
{
// Test that it doesn't crash.
const char* xml = "<?xml version=\"1.0\"?><root><sample><field0><1</field0><field1>2</field1></sample></root>";
XMLDocument doc;
doc.Parse(xml);
doc.PrintError();
const char* xml = "<?xml version=\"1.0\"?><root><sample><field0><1</field0><field1>2</field1></sample></root>";
XMLDocument doc;
doc.Parse(xml);
doc.PrintError();
}
#if 1
@@ -1390,6 +1390,13 @@ int main( int argc, const char ** argv )
doc.Clear();
}
}
{
// If this doesn't assert in DEBUG, all is well.
tinyxml2::XMLDocument doc;
tinyxml2::XMLElement *pRoot = doc.NewElement("Root");
doc.DeleteNode(pRoot);
}
// ----------- Performance tracking --------------