Developers and getting them to improve their code.

Harri Porten kde-optimize@mail.kde.org
Thu, 9 Jan 2003 08:17:25 +0100 (CET)


On Wed, 8 Jan 2003, Werner Trobin wrote:

> On Wednesday 08 January 2003 21:28, Zack Rusin wrote:
> > On Wednesday 08 January 2003 15:13, Benjamin Meyer wrote:
> > > > I _guess_ the dtor was added to allow future extensibility. The
> > > > Q_OBJECT looks necessary to me though, because without it it would
> > > > be impossible to use signals/slots in a class derived from the uic
> > > > generated one, or?

I can make the change to ommit the empty destructor (if we come to some
agreement re the benefit). But as the Q_OBJECT macro also has the purpose
 of supplying a className() definition it's not easy to remove without
breaking people's code. How about extra command line arguments ?

> Removing the (empty) implementation of a virtual destructor might even 
> decrease the performance! The compiler puts a generated version of the 
> destructor in every translation unit where it needs it, so you might end up 
> with a bigger binary size.

Hmmmm. But removing empty destructors was one of the things that Apple did
in kjs. Hmmm again. Have to check if they also removed the virtual keyword
in the base class.

Harri.