diff --git a/src/common/object_pool.h b/src/common/object_pool.h index 362553313b85..b43a0cf25998 100644 --- a/src/common/object_pool.h +++ b/src/common/object_pool.h @@ -133,7 +133,11 @@ struct ObjectPoolAllocatable { template ObjectPool::~ObjectPool() { for (auto i : allocated_) { +#ifdef _MSC_VER + _aligned_free(i); +#else free(i); +#endif } }