Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

Inheriting from non-virtual dtor base class

$
0
0
I lately realized that classes like QWidget [qt.gitorious.org] do not have a virtual dtor. But still lot many classes are using QWidget for public inheritance. And if I go by the guideline of Herb Sutter – Guideline #4 in this article [gotw.ca] then: A base class destructor should be either public and virtual, or protected and nonvirtual. So what philosophy do we have in Qt regarding public base class’s dtor ? And what about the semi-destruction of object when deleted from base class pointer ? Thanks for your time. shashank

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>