Рассматривается однопоточное приложение / this case is about single-thread app
В описании класса есть замечание:
Once a wxXmlNode has been added to a wxXmlDocument it becomes owned by the document and this has two implications. Firstly, the wxXmlDocument takes responsibility for deleting the node so the user should not delete it; and secondly, a wxXmlNode must always be created on the heap and never on the stack.
То есть, где бы мы ни создали (не важно, в какой функции и т.д.) объект wxXmlNode* = new wxXmlNode(... , если указатель на него в итоге попадает как child в root-node какого-либо wxXmlDocument, этот Document при срабатывании его деструктора сам этот указатель на node и должен освободить?
//
So, no matter where node object was created (in which function), since its pointer was captured by wxXmlDocument obj as child node of its root node, Doc object will free this node pointer when doc's destructor will be called?