//================================================================== /// ResourceManager //================================================================== void ResourceManager::Collect() { // TODO: should not block during delete DUT::CriticalSection::Block lock( mCSection ); size_t wi = 0; for (size_t ri=0; ri < mpList.size(); ++ri) { if ( mpList[ri]->GetRef() == 0 ) { DDELETE( mpList[ri] ); mpList[ri] = NULL; } else { if ( wi != ri ) mpList[wi++] = mpList[ri]; } } mpList.resize( wi ); }
///////////// CLEANUP void BubbleLogic::SingletonCleanUp(void){ DDELETE( bub); DDELETE( bob); }