[Digikam-devel] Re: Logic error
Andi Clemens
andi.clemens at gmx.net
Sun Nov 21 21:39:27 GMT 2010
cppcheck and the built-in "Run C/C++ Code Analysis"
Andi Clemens
-----------------
www.digikam.org
On Sunday 21 November 2010 22:36:47 Johannes Wienke wrote:
> Am 21.11.2010 22:27 schrieb Andi Clemens:
> > I added a "virtual" keyword to every destructor now (besides the clases
> > from 3rdparty), to make things easier.
> > It shouldn't hurt to have virtual destructors, even when no virtual
> > method is in the base class.
> >
> > But could it have disadvantages? Slowdowns of some kind?
> >
> > The advantage would be to get rid of possible memory leaks due to wrong
> > destructor callings.
> >
> > The patch is in a local branch, I will do further tests, but I'll wait
> > for the digiKam 1.6.0 release anyways, so please comment here if you
> > think the patch would be wrong and we should only add "virtual" to those
> > classes with virtual methods.
>
> It would sometimes cost an extra vtable. Probably neglectable.
>
> What are you using for code analysis in eclipse?
>
> Regards,
> Johannes
More information about the Digikam-devel
mailing list