//------------------------------------------------------------------------------ void Console::cleanTempDir(AbsDir* dir) { if (dir->getTemp()) { delete dir; return; } // operator on copy AbsDirs dirs(dir->beginChildIter(), dir->endChildIter()); std::for_each( dirs.begin(), dirs.end(), [&](AbsDir* d) -> void { cleanTempDir(d); }); }
ActionThread::~ActionThread() { cleanTempDir(); delete d; }
void ActionThread::cancel() { d->running = false; d->encoder->cancel(); cleanTempDir(); }
//------------------------------------------------------------------------------ void Console::cleanTempDirs() { cleanTempDir(&sgRootDir); }