Simplify. There is no need for a SAFE_DELETE since attribute and children data structures are clear()ed.

This commit is contained in:
Steve Checkoway
2007-02-04 13:23:24 +00:00
parent eebc1e9f3c
commit 424f04219b
2 changed files with 3 additions and 8 deletions
+2 -7
View File
@@ -35,11 +35,6 @@ XNode::XNode( const XNode &cpy ):
this->AppendChild( new XNode(*c) );
}
XNode::~XNode()
{
Free();
}
void XNode::Clear()
{
Free();
@@ -49,9 +44,9 @@ void XNode::Clear()
void XNode::Free()
{
FOREACH_Child( this, p )
SAFE_DELETE( p );
delete p;
FOREACH_Attr( this, pAttr )
SAFE_DELETE( pAttr->second );
delete pAttr->second;
m_childs.clear();
m_attrs.clear();