On 05/23/2014 01:47 PM, Markus Mohrhard wrote:
On Fri, May 23, 2014 at 1:24 PM, Eike Rathke <erack@redhat.com
<mailto:erack@redhat.com>> wrote:
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?
There is code in formula which generates objects from sc but can of
course only use the abstract interfaces. Instead of deleting the objects
we just leak them after use because the d'tor is protected.
If client code wants to polymorphically delete through
IFunctionDescription (which I understand it does), then
IFunctionDescription of course needs a public virtual dtor.
Whether or not to decorate IFunctionDescription with
__declspec(novtable) (AKA SAL_NO_VTABLE) on Windows should be an
orthogonal decision (at least, that's my---poor, as it is about Windows
after all---understanding of __declspec(novtable)).
Stephan
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.