If I override the destructor of my class, is it possible to made some check in it if that instance should be killed or sent to a pool? I want to make simple to reuse the obj, the user only needs to free it (or leave for compiler) and the destructor would check if that's reusable.
ReusableClass::~ReusableClass() {
if (x == 1) {
// abort destructor, send to pool
}
}