Explorar el Código

Merge pull request #321 from Dmitry-Me/dontLeakTheElement

Don't leak the element
Lee Thomason hace 11 años
padre
commit
9f24acd369
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      xmltest.cpp

+ 2 - 0
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