fix obj pool interface

master
Francisco 4 years ago committed by Francisco Paisana
parent 344bdf3165
commit a780a6a7b6

@ -27,11 +27,9 @@ public:
explicit pool_deallocator(obj_pool_itf<T>* pool_ = nullptr) : pool(pool_) {}
void operator()(void* ptr)
{
if (ptr != nullptr) {
static_cast<T*>(ptr)->~T();
// dtor is not called, as object is going to be recycled
pool->do_deallocate(ptr);
}
}
};
using object_type = T;

Loading…
Cancel
Save