MCPcopy Create free account
hub / github.com/JayXon/Leanify / Clear

Method Clear

lib/tinyxml2/tinyxml2.cpp:1699–1728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1697
1698
1699void 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
1731XMLElement* XMLDocument::NewElement( const char* name )

Callers 1

ParseMethod · 0.45

Calls 4

ErrorFunction · 0.85
TraceMethod · 0.80
CurrentAllocsMethod · 0.80
UntrackedMethod · 0.80

Tested by

no test coverage detected