deleter(d)
{ }
-PoolBase::PoolBase(PoolBase &&other):
- object_size(other.object_size),
- blocks(other.blocks),
- free_list(other.free_list),
- object_count(other.object_count),
- capacity(other.capacity),
- deleter(other.deleter)
-{
- other.blocks = nullptr;
- other.free_list = nullptr;
- other.object_count = 0;
- other.capacity = 0;
-}
-
-PoolBase &PoolBase::operator=(PoolBase &&other)
-{
- destroy_all();
-
- object_size = other.object_size;
- blocks = other.blocks;
- free_list = other.free_list;
- object_count = other.object_count;
- capacity = other.capacity;
- deleter = other.deleter;
-
- other.blocks = nullptr;
- other.free_list = nullptr;
- other.object_count = 0;
- other.capacity = 0;
-
- return *this;
-}
-
PoolBase::~PoolBase()
{
destroy_all();