Using uic generated classes as a base class in public API

Sylvain Joyeux sjoyeux at
Thu Mar 3 00:33:03 UTC 2005

> It's a huge mistake to use classes generated by uic in public API. The
> reason for this is that uic generated classes lack virtual destructors.
> Without virtual destructors, derived class destructors are never called,
> and then leak memory, objects don't get deleted properly, in essence,
> you're screwed.
Well, AFAIK uic designed classes derive from (at least) QObjet which is a 
polymorphic class and - as such - has a virtual destructor. 


More information about the KDevelop-devel mailing list