}
wxXmlNode::~wxXmlNode()
+{
+ DoFree();
+}
+
+wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
+{
+ if ( &node != this )
+ {
+ DoFree();
+ DoCopy(node);
+ }
+
+ return *this;
+}
+
+void wxXmlNode::DoFree()
{
wxXmlNode *c, *c2;
for (c = m_children; c; c = c2)
}
}
-wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
-{
- wxDELETE(m_attrs);
- wxDELETE(m_children);
- DoCopy(node);
- return *this;
-}
-
void wxXmlNode::DoCopy(const wxXmlNode& node)
{
m_type = node.m_type;