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.

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

Reply via email to