Explorar el Código

storage: shrink_to_fit storage pools

Michele Caini hace 1 año
padre
commit
fae3345f79
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/entt/entity/storage.hpp

+ 1 - 0
src/entt/entity/storage.hpp

@@ -296,6 +296,7 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
         }
 
         payload.resize(from);
+        payload.shrink_to_fit();
     }
 
     void swap_at(const std::size_t from, const std::size_t to) {