default override of virtual destructor

前端 未结 7 1094
孤独总比滥情好
孤独总比滥情好 2021-02-01 12:50

Everyone knows that the desructor of base class usually has to be virtual. But what is about the destructor of derived class? In C++11 we have keyword \"override\" and ability t

7条回答
  •  你的背包
    2021-02-01 13:02

    I think "override" is kind of misleading on destructor. When you override virtual function, you replace it. The destructors are chained, so you can't override destructor literally

提交回复
热议问题