void Fragment::releaseInstances() { logger::warn("attempt to release Fragment instances\n"); // release any instantiations vector<AsscInstance*>::iterator iter; _foreach(_instantiations, iter) delete *iter; _instantiations.clear(); _numInstances = 0; _instTests = 0; }
TransportLayer::Stats TransportLayerManager::sessionStats() { Stats stats; _foreach([&](TransportLayer* tl) { Stats s = tl->sessionStats(); stats.numOpenSessions += s.numOpenSessions; stats.numCreatedSessions += s.numCreatedSessions; if (std::numeric_limits<size_t>::max() - stats.numAvailableSessions < s.numAvailableSessions) { stats.numAvailableSessions = std::numeric_limits<size_t>::max(); } else { stats.numAvailableSessions += s.numAvailableSessions; } }); return stats; }
void TransportLayerManager::endAllSessions(Session::TagMask tags) { _foreach([&tags](TransportLayer* tl) { tl->endAllSessions(tags); }); }
void TransportLayerManager::shutdown() { _foreach([](TransportLayer* tl) { tl->shutdown(); }); }