Fix string leaking (and destructors not getting called) when there are XMLNodes that aren't in the document tree
This commit is contained in:
14
xmltest.cpp
14
xmltest.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user