Explorar o código

storage: minor changes

Michele Caini %!s(int64=5) %!d(string=hai) anos
pai
achega
42a763031c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/entt/entity/storage.hpp

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

@@ -227,9 +227,9 @@ class basic_storage_impl: public basic_sparse_set<Entity, typename std::allocato
 
             for(auto pos = length; pos < bucket; ++pos) {
                 alloc_traits::deallocate(allocator, packed[pos], packed_page);
+                bucket_alloc_traits::destroy(bucket_allocator, std::addressof(packed[pos]));
             }
 
-            std::destroy(packed, packed + bucket);
             bucket_alloc_traits::deallocate(bucket_allocator, packed, bucket);
 
             packed = mem;