mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-27 21:08:44 +08:00
Added destructor to release all remaining items in the pool.
This commit is contained in:
parent
1aa6b33d06
commit
db375602d4
12
src/ipool.h
12
src/ipool.h
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user