Class predestructible

boost::predestructible — A base class for classes with predestructors, used in conjunction with deconstruct_ptr().

Synopsis

class predestructible {
protected:
  // construct/copy/destruct
  virtual ~predestructible();
public:
  virtual void predestruct();
};

Description

predestructible protected construct/copy/destruct

  1. virtual ~predestructible();
virtual void predestruct();
Notes:

Override predestruct() with your class' pre-destructor. It will be called automatically if you manage your objects with shared_ptrs that use predestructing_deleter as their deleter, such as those created with deconstruct_ptr()