| 1697 | |
| 1698 | |
| 1699 | void XMLDocument::Clear() |
| 1700 | { |
| 1701 | DeleteChildren(); |
| 1702 | |
| 1703 | #ifdef DEBUG |
| 1704 | const bool hadError = Error(); |
| 1705 | #endif |
| 1706 | _errorID = XML_NO_ERROR; |
| 1707 | _errorStr1 = 0; |
| 1708 | _errorStr2 = 0; |
| 1709 | |
| 1710 | delete [] _charBuffer; |
| 1711 | _charBuffer = 0; |
| 1712 | |
| 1713 | #if 0 |
| 1714 | _textPool.Trace( "text" ); |
| 1715 | _elementPool.Trace( "element" ); |
| 1716 | _commentPool.Trace( "comment" ); |
| 1717 | _attributePool.Trace( "attribute" ); |
| 1718 | #endif |
| 1719 | |
| 1720 | #ifdef DEBUG |
| 1721 | if ( !hadError ) { |
| 1722 | TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() ); |
| 1723 | TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() ); |
| 1724 | TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() ); |
| 1725 | TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() ); |
| 1726 | } |
| 1727 | #endif |
| 1728 | } |
| 1729 | |
| 1730 | |
| 1731 | XMLElement* XMLDocument::NewElement( const char* name ) |
no test coverage detected