------------------------- EcsCommandBuffer::d-tor
| 20 | // EcsCommandBuffer::d-tor |
| 21 | // |
| 22 | EcsCommandBuffer::~EcsCommandBuffer() |
| 23 | { |
| 24 | ET_ASSERT(m_ReparentEntities.empty(), "deleting command buffer before it was merged!"); |
| 25 | ET_ASSERT(m_RemoveEntities.empty(), "deleting command buffer before it was merged!"); |
| 26 | ET_ASSERT(m_AddComponents.empty(), "deleting command buffer before it was merged!"); |
| 27 | ET_ASSERT(m_RemoveComponents.empty(), "deleting command buffer before it was merged!"); |
| 28 | |
| 29 | for (std::pair<T_EntityId const, AddBuffer>& addPair : m_AddComponents) |
| 30 | { |
| 31 | for (RawComponentPtr const& ptr : addPair.second.components) |
| 32 | { |
| 33 | // match malloc with free - hence we don't use the full destructor |
| 34 | ComponentRegistry::Instance().GetDestructor(ptr.typeIdx)(ptr.data); |
| 35 | free(ptr.data); |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | |
| 41 | // create new entities |
nothing calls this directly
no test coverage detected