Kaynağa Gözat

add comment

Lee Thomason 3 gün önce
ebeveyn
işleme
682fda289f
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      tinyxml2.cpp

+ 3 - 0
tinyxml2.cpp

@@ -834,6 +834,9 @@ XMLNode::XMLNode( XMLDocument* doc ) :
 
 XMLNode::~XMLNode()
 {
+    // Fast path: this node is dying, so maintaining _firstChild/_lastChild and
+    // sibling _prev/_next links is unnecessary. Only _parent must be zeroed to
+    // satisfy the MarkInUse assertion inside DeleteNode.
     XMLNode *currentChild = _firstChild;
     while (currentChild != NULL) {
         XMLNode *next = currentChild->_next;