From 682fda289fb317002bde5b65d0b83261ecf05e3e Mon Sep 17 00:00:00 2001 From: Lee Thomason Date: Sat, 23 May 2026 16:04:26 -0700 Subject: [PATCH] add comment --- tinyxml2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 0381d51..7844aee 100644 --- a/tinyxml2.cpp +++ b/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;