MCPcopy Create free account
hub / github.com/Illation/ETEngine / ~EcsCommandBuffer

Method ~EcsCommandBuffer

Engine/source/EtFramework/ECS/EcsCommandBuffer.cpp:22–38  ·  view source on GitHub ↗

------------------------- EcsCommandBuffer::d-tor

Source from the content-addressed store, hash-verified

20// EcsCommandBuffer::d-tor
21//
22EcsCommandBuffer::~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

Callers

nothing calls this directly

Calls 1

GetDestructorMethod · 0.80

Tested by

no test coverage detected