void close() { if (hQuery_ == NULL) throw pdh_exception("query is null!"); PDH::PDHFactory::get_impl()->remove_listener(this); on_unload(); counters_.clear(); }
ResourceManager::~ResourceManager() { const ResourceMap::Entry* begin = sort_map::begin(_rm); const ResourceMap::Entry* end = sort_map::end(_rm); for (; begin != end; begin++) { const StringId64 type = begin->pair.first.type; const StringId64 name = begin->pair.first.name; on_offline(type, name); on_unload(type, begin->pair.second.data); } }
/** self **/ void ApplicationBase::run(const int argc, const char** argv){ OPH(); // on load if(!on_load(argc, argv)){ ERROR("Core load failed"); return; } // run ProcessLocal* process =ProcessLocal::Instance(); while(process->update()); // on unload on_unload(); }
void ResourceManager::unload(StringId64 type, StringId64 name) { flush(); ResourcePair id = { type, name }; ResourceEntry& entry = sort_map::get(_rm, id, ResourceEntry::NOT_FOUND); if (--entry.references == 0) { on_offline(type, name); on_unload(type, entry.data); sort_map::remove(_rm, id); sort_map::sort(_rm); } }