wxHtmlParser::~wxHtmlParser()
{
- while (RestoreState())
- DestroyDOMTree();
+ while (RestoreState()) {}
+ DestroyDOMTree();
+
delete m_HandlersStack;
m_HandlersHash.Clear();
m_HandlersList.DeleteContents(TRUE);
{
if (!m_SavedStates) return FALSE;
+ DestroyDOMTree();
+
wxHtmlParserState *s = m_SavedStates;
m_SavedStates = s->m_nextState;