MCPcopy Create free account
hub / github.com/crownengine/crown / unload

Method unload

src/resource/resource_manager.cpp:153–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void ResourceManager::unload(StringId64 type, StringId64 name)
154{
155 ResourcePair id = { type, name };
156 ResourceData &rd = hash_map::get(_resources, id, ResourceData::NOT_FOUND);
157
158 if (--rd.references == 0) {
159 on_offline(type, name);
160 on_unload(type, rd.allocator, rd.data);
161
162 hash_map::remove(_resources, id);
163 }
164}
165
166void *ResourceManager::reload(StringId64 type, StringId64 name)
167{

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
removeFunction · 0.50

Tested by

no test coverage detected