mueller at kde.org
Tue Oct 4 12:28:56 BST 2005
On Monday 03 October 2005 11:52, Stephan Kulow wrote:
> One should note that you need to write a destructor and the assignment
> operators anyway, as otherwise you have no guarantee that the compiler will
> destruct the class even if you exchange the lib without recompiling the
> apps later.
Wrong. You have to add a dummy dtor if you try to be really sure that your
dtor is called, but the assignment/copy ctr operators are not necessary.
Furthermore as long as they're missing the compiler can do strength reduction
which in some cases provides amazing speedup. My personal bet is that a lot
of the QString speedups in Qt4 is actually just caused by the removal of the
copy ctor on QChar.
More information about the kde-core-devel