Consider the following code snippet:
class A
{
virtual void function();
public:
virtual ~A() {};
}
class B: public A
{
virtual void function() override final;
public:
~B() {};
}
I can easily find information about the base class destructor, for example. http://en.cppreference.com/w/cpp/language/destructor
"Deleting an object using a pointer to the base causes undefined behavior if the destructor in the base class is virtual. In general, the destructor of the base class must be open and virtual, or protected and not virtual."
, , /? , . vtable / ? :
class A
{
virtual void function();
public:
virtual ~A() {};
}
class B: public A
{
virtual void function() override;
public:
~B() {};
}
class C: public B
{
virtual void function() override final;
public:
~C() {};
}