From 43811e1886f73c7fcdd29fc56c75a63588fae6ad Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 8 Mar 2018 18:00:35 +0100 Subject: [PATCH] deallocate used buffers in buffer_pool dtor --- lib/include/srslte/common/buffer_pool.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/include/srslte/common/buffer_pool.h b/lib/include/srslte/common/buffer_pool.h index 035fbc661..76634a697 100644 --- a/lib/include/srslte/common/buffer_pool.h +++ b/lib/include/srslte/common/buffer_pool.h @@ -72,6 +72,10 @@ public: delete available.top(); available.pop(); } + + for (uint32_t i = 0; i < used.size(); i++) { + delete used[i]; + } } void print_all_buffers()