소스 검색

Merge pull request #321 from Dmitry-Me/dontLeakTheElement

Don't leak the element
Lee Thomason 11 년 전
부모
커밋
9f24acd369
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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