txExecutionState::~txExecutionState() { MOZ_COUNT_DTOR(txExecutionState); delete mResultHandler; delete mLocalVariables; if (mEvalContext != mInitialEvalContext) { delete mEvalContext; } txStackIterator varsIter(&mLocalVarsStack); while (varsIter.hasNext()) { delete (txVariableMap*)varsIter.next(); } txStackIterator contextIter(&mEvalContextStack); while (contextIter.hasNext()) { txIEvalContext* context = (txIEvalContext*)contextIter.next(); if (context != mInitialEvalContext) { delete context; } } txStackIterator handlerIter(&mResultHandlerStack); while (handlerIter.hasNext()) { delete (txAXMLEventHandler*)handlerIter.next(); } txStackIterator paramIter(&mParamStack); while (paramIter.hasNext()) { delete (txVariableMap*)paramIter.next(); } delete mInitialEvalContext; }
txExecutionState::~txExecutionState() { delete mResultHandler; delete mLocalVariables; delete mEvalContext; PRInt32 i; for (i = 0; i < mTemplateRuleCount; ++i) { NS_IF_RELEASE(mTemplateRules[i].mModeLocalName); } delete [] mTemplateRules; txStackIterator varsIter(&mLocalVarsStack); while (varsIter.hasNext()) { delete (txVariableMap*)varsIter.next(); } txStackIterator contextIter(&mEvalContextStack); while (contextIter.hasNext()) { txIEvalContext* context = (txIEvalContext*)contextIter.next(); if (context != mInitialEvalContext) { delete context; } } txStackIterator handlerIter(&mResultHandlerStack); while (handlerIter.hasNext()) { delete (txAXMLEventHandler*)handlerIter.next(); } txStackIterator paramIter(&mParamStack); while (paramIter.hasNext()) { delete (txVariableMap*)paramIter.next(); } }