I have a solid understanding of most OO theory but the one thing that confuses me a lot is virtual destructors.
I thought that the destructor always gets called no matter what and for every object in the chain.
When are you meant to make them virtual and why?
转载于:https://stackoverflow.com/questions/461203/when-to-use-virtual-destructors