No, destructors (and constructors) are special and you can not over-ride a destructor, nor should you need to.
In a class heirarchy
-
class Base
-
{
-
public:
-
Base() {}
-
~Base() {}
-
};
-
-
class Derived : public Base
-
{
-
public:
-
Derived() {}
-
~Derived() {}
-
};
-
When you construct an instance of Derived after the memory is allocated the first thing that happens is the Base() is called, the Derived() is called.
Destruction happens in a similar manor but reverses the order, first ~Derived() is called, then ~Base() is called.
You can not over-ride ~Base in Derived because the compiler knows that the method starting with ~ is the destructor and that the symbol name following should be the name of the class. There is also no need to over-ride as the Base destructor is going to be called anyway and should be doing the appropriate clean-up for Base.