소스 검색

Merge branch 'master' of github.com:IMBIGFISH4/xml2 into IMBIGFISH4-master

Lee Thomason 3 일 전
부모
커밋
e6a464942f
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      tinyxml2.cpp

+ 8 - 1
tinyxml2.cpp

@@ -834,7 +834,14 @@ XMLNode::XMLNode( XMLDocument* doc ) :
 
 XMLNode::~XMLNode()
 {
-    DeleteChildren();
+    XMLNode *currentChild = _firstChild;
+    while (currentChild != NULL) {
+        XMLNode *next = currentChild->_next;
+        currentChild->_parent = 0;
+        DeleteNode(currentChild);
+        currentChild = next;
+    }
+
     if ( _parent ) {
         _parent->Unlink( this );
     }