On Donnerstag, 20. Juni 2013 16:53:15 CEST, Jan Kundrát wrote:

What I'm saying is that if you have class Foo: public QObject, you have to declare and define a non-inlined virtual destructor ~Foo(). You're right that not marking it as "virtual" doesn't matter. If there's no explicit ~Foo(), you won't be able to use dynamic_cast<Foo&> correctly and reliably from multiple translation units, AFAIK.

You mean like lib-crossing RTTI trouble for non explcit (virtual) 
deconstructors and the dlopen case?

I was advised to avoid dynamic_cast in that case, but there's explanation 
what's required for this in the gcc faq:

http://gcc.gnu.org/faq.html#dso

OTOH:
-----
QStyle inherits QObject and yet has an explicit empty deconstructor.
It's the same case - and actually the empty deconstructor will cause no harm fo 
sure ;-)

Cheers,
Thomas

Reply via email to