| 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 | { |
no test coverage detected