Replace destructor call with static assert

This commit is contained in:
2024-03-08 17:17:12 -08:00
parent 34430dbbe7
commit b79d8f71d3
+1 -1
View File
@@ -299,7 +299,7 @@ struct BoundedFreeListAllocator {
#if SHOW_MEMORY
--liveAllocations;
#endif
p->~T();
static_assert(std::is_trivially_destructible_v<T>);
if (freeListSize == kMaxFreeListSize) {
return free(p);
}