On 05/23/2014 01:47 PM, Markus Mohrhard wrote:
On Fri, May 23, 2014 at 1:24 PM, Eike Rathke <[email protected] <mailto:[email protected]>> 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 _______________________________________________ LibreOffice mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice
