Pure virtual destructor in C++
Yes. You also need to implement the destructor: class A { public: virtual ~A() = 0; }; inline A::~A() { } should suffice. If you derive anything from A and then try to delete or destroy it, A‘s destructor will eventually be called. Since it is pure and doesn’t have an implementation, undefined behavior will … Read more