InstrumentManager::~InstrumentManager() { Instrument* instr; csHash<Instrument*, csString>::GlobalIterator instrIter(instruments.GetIterator()); while(instrIter.HasNext()) { instr = instrIter.Next(); delete instr; } instruments.DeleteAll(); }
txStylesheet::~txStylesheet() { // Delete all ImportFrames delete mRootFrame; txListIterator frameIter(&mImportFrames); while (frameIter.hasNext()) { delete static_cast<ImportFrame*>(frameIter.next()); } txListIterator instrIter(&mTemplateInstructions); while (instrIter.hasNext()) { delete static_cast<txInstruction*>(instrIter.next()); } // We can't make the map own its values because then we wouldn't be able // to merge attributesets of the same name txExpandedNameMap<txInstruction>::iterator attrSetIter(mAttributeSets); while (attrSetIter.next()) { delete attrSetIter.value(); } }