Fix string leaking (and destructors not getting called) when there are XMLNodes that aren't in the document tree

This commit is contained in:
Lee Thomason
2017-06-05 14:35:55 -07:00
parent 53858b4490
commit 816d3fa0cd
3 changed files with 63 additions and 3 deletions

View File

@@ -1641,6 +1641,20 @@ int main( int argc, const char ** argv )
}
}
{
// Oh those memory leaks.
// Only way to see these is in the (Windows) allocator tracking.
{
XMLDocument doc;
doc.NewElement("LEAK 1");
}
{
XMLDocument doc;
XMLElement* ele = doc.NewElement("LEAK 2");
doc.DeleteNode(ele);
}
}
// ----------- Line Number Tracking --------------
{
struct TestUtil: XMLVisitor