MCPcopy Create free account
hub / github.com/defold/defold / RemoveDynamicResourceHash

Function RemoveDynamicResourceHash

engine/gameobject/src/gameobject/gameobject.cpp:318–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316 }
317
318 void RemoveDynamicResourceHash(HCollection hcollection, dmhash_t resource_hash)
319 {
320 Collection* collection = hcollection->m_Collection;
321 dmMutex::Lock(collection->m_Mutex);
322 for (int i = 0; i < collection->m_DynamicResources.Size(); ++i)
323 {
324 if (collection->m_DynamicResources[i] == resource_hash)
325 {
326 collection->m_DynamicResources.EraseSwap(i);
327 }
328 }
329 dmMutex::Unlock(collection->m_Mutex);
330 }
331
332 static void ReleaseDynamicResources(Collection* collection)
333 {

Callers 1

ReleaseResourceFunction · 0.85

Calls 3

LockFunction · 0.50
UnlockFunction · 0.50
SizeMethod · 0.45

Tested by

no test coverage detected