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

Function DeallocCollection

engine/gameobject/src/gameobject/gameobject.cpp:429–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427 }
428
429 void DeallocCollection(Collection* collection)
430 {
431 DM_PROFILE("DeallocCollection");
432
433 HRegister regist = collection->m_Register;
434 for (uint32_t i = 0; i < regist->m_ComponentTypeCount; ++i)
435 {
436 DM_PROFILE_DYN(regist->m_ComponentTypes[i].m_Name, 0);
437
438 ComponentDeleteWorldParams params;
439 params.m_Context = regist->m_ComponentTypes[i].m_Context;
440 params.m_World = collection->m_ComponentWorlds[i];
441 if (regist->m_ComponentTypes[i].m_DeleteWorldFunction)
442 regist->m_ComponentTypes[i].m_DeleteWorldFunction(params);
443 }
444 dmMutex::Delete(collection->m_Mutex);
445 delete collection;
446 }
447
448 Result AttachCollection(Collection* collection, const char* name, dmResource::HFactory factory, HRegister regist, HCollection hcollection)
449 {

Callers 2

NewCollectionFunction · 0.85
DeleteCollectionFunction · 0.85

Calls 1

DeleteFunction · 0.70

Tested by

no test coverage detected