C ++ base classes are recommended for virtual destructor classes. C ++ is a really old programming language, and in the absence of a virtual destructor, an object of a derived class may be partially or incorrectly destroyed.
Of course, a pure virtual destructor will prevent the creation of instances of this class, but I think that in order to make it clear that you are not expecting to create this class, you can also create protected constructors, as @Niels pointed out in his answer.
Hope this helps.
Baltasarq
source share