+wxXmlNode::~wxXmlNode()
+{
+ wxXmlNode *c, *c2;
+ for (c = m_children; c; c = c2)
+ {
+ c2 = c->m_next;
+ delete c;
+ }
+
+ wxXmlProperty *p, *p2;
+ for (p = m_properties; p; p = p2)
+ {
+ p2 = p->GetNext();
+ delete p;
+ }
+}
+
+
+
wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
{
- delete m_properties;
- delete m_children;
+ wxDELETE(m_properties);
+ wxDELETE(m_children);
DoCopy(node);
return *this;
}
{
if (!Load(filename, io_type))
{
- delete m_root;
- m_root = NULL;
+ wxDELETE(m_root);
}
}
{
if (!Load(stream, io_type))
{
- delete m_root;
- m_root = NULL;
+ wxDELETE(m_root);
}
}
wxXmlDocument& wxXmlDocument::operator=(const wxXmlDocument& doc)
{
- delete m_root;
+ wxDELETE(m_root);
DoCopy(doc);
return *this;
}
void wxXmlDocument::CleanUpHandlers()
{
- delete sm_handlers;
- sm_handlers = NULL;
+ wxDELETE(sm_handlers);
}