From db375602d43d1db3d370c3203167b9e3feedf122 Mon Sep 17 00:00:00 2001 From: jwellbelove Date: Mon, 12 Dec 2016 10:54:30 +0000 Subject: [PATCH] Added destructor to release all remaining items in the pool. --- src/ipool.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ipool.h b/src/ipool.h index 34c4e7d2..ad3c16d1 100644 --- a/src/ipool.h +++ b/src/ipool.h @@ -46,7 +46,7 @@ namespace etl //*************************************************************************** template class ipool : public pool_base - { + { public: typedef T value_type; @@ -358,7 +358,7 @@ namespace etl return result; } - + //************************************************************************* /// Release an object in the pool. /// If asserts or exceptions are enabled and the object does not belong to this @@ -505,6 +505,14 @@ namespace etl { } + //************************************************************************* + /// Destructor + //************************************************************************* + ~ipool() + { + release_all(); + } + private: // Disable copy construction and assignment.