mirror of https://github.com/AxioDL/tinyxml2.git
Don't leak the element
This commit is contained in:
parent
4a0392dd9d
commit
5daa54cf2b
|
@ -1435,6 +1435,8 @@ int main( int argc, const char ** argv )
|
||||||
XMLElement* newElement = doc.NewElement( "printme" );
|
XMLElement* newElement = doc.NewElement( "printme" );
|
||||||
XMLPrinter printer;
|
XMLPrinter printer;
|
||||||
newElement->Accept( &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
|
// Issue 302. Clear errors from LoadFile/SaveFile
|
||||||
|
|
Loading…
Reference in New Issue