From a780a6a7b62ccef48893b35c05c5484da686fabc Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 7 Apr 2021 15:29:45 +0100 Subject: [PATCH] fix obj pool interface --- lib/include/srsran/adt/pool/pool_interface.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/include/srsran/adt/pool/pool_interface.h b/lib/include/srsran/adt/pool/pool_interface.h index ba9e8771b..f2007fd3a 100644 --- a/lib/include/srsran/adt/pool/pool_interface.h +++ b/lib/include/srsran/adt/pool/pool_interface.h @@ -27,10 +27,8 @@ public: explicit pool_deallocator(obj_pool_itf* pool_ = nullptr) : pool(pool_) {} void operator()(void* ptr) { - if (ptr != nullptr) { - static_cast(ptr)->~T(); - pool->do_deallocate(ptr); - } + // dtor is not called, as object is going to be recycled + pool->do_deallocate(ptr); } }; using object_type = T;