MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / Clear

Method Clear

Source/ThirdParty/tinyxml2/tinyxml2.cpp:2039–2070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2037}
2038
2039void XMLDocument::Clear()
2040{
2041 DeleteChildren();
2042 while( _unlinked.Size()) {
2043 DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete.
2044 }
2045
2046#ifdef TINYXML2_DEBUG
2047 const bool hadError = Error();
2048#endif
2049 ClearError();
2050
2051 delete [] _charBuffer;
2052 _charBuffer = 0;
2053 _parsingDepth = 0;
2054
2055#if 0
2056 _textPool.Trace( "text" );
2057 _elementPool.Trace( "element" );
2058 _commentPool.Trace( "comment" );
2059 _attributePool.Trace( "attribute" );
2060#endif
2061
2062#ifdef TINYXML2_DEBUG
2063 if ( !hadError ) {
2064 TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
2065 TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
2066 TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
2067 TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
2068 }
2069#endif
2070}
2071
2072
2073void XMLDocument::DeepCopy(XMLDocument* target) const

Callers 2

DeepCopyMethod · 0.45
ParseMethod · 0.45

Calls 6

ErrorFunction · 0.85
ClearErrorFunction · 0.85
TraceMethod · 0.80
CurrentAllocsMethod · 0.80
UntrackedMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected