Ray's playground

 

Item 7: Declare destructors virtual in polymorphic base classes(Effective C++)

Polymorphic base classes should declare virtual destructors. If a class has any virtual functions, it should have a virtual destructor.

Classes not designed to be base classes or not designed to be used polymorphically should not declare virtual destructors.

posted on 2009-12-26 13:22  Ray Z  阅读(206)  评论(0编辑  收藏  举报

导航