Hi Markus,

On Friday, 2014-05-23 03:14:30 +0200, Markus Mohrhard wrote:

> so by going through Lsan reports I noted that we have a few classes in
> formula that are marked with SAL_NO_VTABLE and therefore have no virtual
> protected destructors, This prevents us from deleting some of these
> instances and it looks like people just leaked them in the past.

What actually leaks, given that these classes have no member variables
and only define interfaces as pure abstract base classes one derives
from?

> Is there any reason not to remove the SAL_NO_VTABLE and make the destructor
> virtual and public. I"m talking especially about
> include/formula/IFunctionDescription.hxx where the use of SAL_NO_VTABLE
> looks like premature optimization to me.

This appears to me as exactly what the comment on SAL_NO_VTABLE in
include/sal/types.h talks about.

But no, if we really leak because of SAL_NO_VTABLE (this is on Windows,
isn't it? because it's defined empty for other platforms) then I don't
object to remove it, but then we should also remove the SAL_NO_VTABLE
define.

However, is it a prerequisite to have a non-virtual dtor when using
SAL_NO_VTABLE? Or wouldn't adding a virtual to the dtor already solve
the problem and not make Lsan stumble about?

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key ID: 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack

Attachment: pgpKN9UBzlugG.pgp
Description: PGP signature

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to