Good introduction to the topic, I only have one comment: the destructor of your base class should be marked virtual as well, since it is an inherited class. For the example it doesn't matter, however if both base and derived classes needed to perform unique and specific actions during destruction it will ensure that the object is fully destructed.
Silly me - I should know that! (In my own code, I always do that.) I've edited accordingly.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.