Added destructor to release all remaining items in the pool.

This commit is contained in:
jwellbelove 2016-12-12 10:54:30 +00:00
parent 1aa6b33d06
commit db375602d4

View File

@ -46,7 +46,7 @@ namespace etl
//***************************************************************************
template <typename T>
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.