Fix string leaking (and destructors not getting called) when there are XMLNodes that aren't in the document tree
diff --git a/xmltest.cpp b/xmltest.cpp
index f49f2e8..a580756 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -1641,6 +1641,20 @@
}
}
+ {
+ // 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