MCPcopy Create free account
hub / github.com/NanoMichael/MicroTeX / Clear

Method Clear

src/xml/tinyxml2.cpp:1564–1592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1562
1563
1564void XMLDocument::Clear() {
1565 DeleteChildren();
1566
1567#ifdef DEBUG
1568 const bool hadError = Error();
1569#endif
1570 _errorID = XML_NO_ERROR;
1571 _errorStr1 = 0;
1572 _errorStr2 = 0;
1573
1574 delete [] _charBuffer;
1575 _charBuffer = 0;
1576
1577#if 0
1578 _textPool.Trace( "text" );
1579 _elementPool.Trace( "element" );
1580 _commentPool.Trace( "comment" );
1581 _attributePool.Trace( "attribute" );
1582#endif
1583
1584#ifdef DEBUG
1585 if ( !hadError ) {
1586 TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
1587 TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
1588 TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
1589 TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
1590 }
1591#endif
1592}
1593
1594
1595XMLElement* 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