3 ms·
"To work correctly, classes with virtual methods must also have virtual destructors." Not a good way to start the article... I immediately question the author'
by android2 16y ago
"To work correctly, classes with virtual methods must also have virtual destructors."
Not a good way to start the article... I immediately question the author's credibility following this statement.
- tomjen3 16y agoWhy? If they don't it is going to mess up the destruction sequence if they are ever stored and then released polymorphically, such as from a collection of pointers to classes. What he is saying is standard C++ knowledge.