aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/utils/object_pool.h
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/hicn/transport/utils/object_pool.h')
-rw-r--r--libtransport/src/hicn/transport/utils/object_pool.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libtransport/src/hicn/transport/utils/object_pool.h b/libtransport/src/hicn/transport/utils/object_pool.h
index 9fda214cd..e34730e81 100644
--- a/libtransport/src/hicn/transport/utils/object_pool.h
+++ b/libtransport/src/hicn/transport/utils/object_pool.h
@@ -62,6 +62,7 @@ class ObjectPool {
void add(T *object) {
utils::SpinLock::Acquire locked(object_pool_lock_);
+
if (TRANSPORT_EXPECT_TRUE(!destructor_)) {
object_pool_.emplace_back(makePtr(object));
}