From 9830ee2fd68b770b7324bdff557923e581fd16b4 Mon Sep 17 00:00:00 2001 From: NukeBird Date: Tue, 18 Feb 2025 22:46:37 +0300 Subject: [PATCH] Don't call dtor since all types are trivially destructable --- zecsy.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/zecsy.hpp b/zecsy.hpp index 218ce73..cf1aa29 100644 --- a/zecsy.hpp +++ b/zecsy.hpp @@ -158,12 +158,6 @@ namespace zecsy auto& pool = pools[id]; auto index = pool.entity_to_index[e]; - /* - * T may be non-POD, so I guess I should call a destructor here - */ - auto comp_ptr = reinterpret_cast(&pool.data[index * sizeof(T)]); - comp_ptr->~T(); - pool.free_list.push_back(index); pool.entity_to_index.erase(e); pool.index_to_entity.erase(index);