MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / clear

Method clear

imperative/src/impl/resource_manager.cpp:67–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65} // namespace
66
67void ResourceManager::clear() {
68 if (throw_all_resources) {
69 new std::vector<std::any>(std::move(m_handles));
70 }
71 for (auto iter = m_handles.rbegin(); iter != m_handles.rend(); ++iter) {
72 (*iter) = {};
73 }
74}
75
76ResourceManager& ResourceManager::get_global() {
77 static GlobalResourceManager sl_manager;

Callers 1

Calls 2

rbeginMethod · 0.80
rendMethod · 0.80

Tested by

no test coverage detected