MCPcopy Create free account
hub / github.com/ajkhoury/ReClassEx / Clear

Method Clear

ReClass/tinyxml2.cpp:2041–2071  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 9

OnFileEditoropenMethod · 0.45
DeepCopyMethod · 0.45
ParseMethod · 0.45
~CNodeFunctionPtrMethod · 0.45
InitializeMethod · 0.45
DisassembleBytesMethod · 0.45
~CNodeFunctionMethod · 0.45
InitializeMethod · 0.45
DisassembleBytesMethod · 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