I have a simple program:
struct B
{
virtual ~B() {}
};
struct D : public B
{
~D() {}
};
So, when I call
B* b = new D;
b->~B();
why is the destructor of the derived class called? It's virtual but we call the destructor by name, or is there a hidden name of the destructor which is the same for all classes?