Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


On Sat, 2013-12-07 at 09:17 -0800, julien2412 wrote:
Hi,

I took a look to
https://scan5.coverity.com:8443/reports.htm#v22002/p10276/fileInstanceId=47958646&defectInstanceId=14481124&mergedDefectId=708945
 32class SbxVarEntry : public SbxVariableRef {
 33public:
 34    OUString* pAlias;
 35    SbxVarEntry() : SbxVariableRef(), pAlias( NULL ) {}
  
CID 708945 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR)1.
nonvirtual_dtor: Class SbxVarEntry has a destructor and a pointer to it is
upcast to class SbxVariableRef which doesn't have a virtual destructor.
 36   ~SbxVarEntry() { delete pAlias; }

The code there is a tangled knot of horror, but I kind of think that
SbxVarEntry should have-a SbxVariableRef rather than be an is-a so not
inherit from it and have a Ref member.

C.


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.