From 5daa54cf2bc32d08341736600116501276017b6b Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Wed, 8 Apr 2015 17:45:07 +0300 Subject: [PATCH] Don't leak the element --- xmltest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmltest.cpp b/xmltest.cpp index 2f13dff..b70fc51 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -1435,6 +1435,8 @@ int main( int argc, const char ** argv ) XMLElement* newElement = doc.NewElement( "printme" ); XMLPrinter printer; newElement->Accept( &printer ); + // Delete the node to avoid possible memory leak report in debug output + doc.DeleteNode( newElement ); } { // Issue 302. Clear errors from LoadFile/SaveFile