Ken Takata wrote:

> 2016/2/27 Sat 23:28:20 UTC+9 Bram Moolenaar wrote:
> > Ken Takata wrote:
> > 
> > > Hi mattn,
> > > 
> > > 2016/2/26 Fri 16:37:01 UTC+9 mattn wrote:
> > > > gui_dwrite.cpp:348:13: warning: deleting object of polymorphic class 
> > > > type 'GdiTextRenderer' which has non-virtual destructor might cause 
> > > > undefined behaviour [-Wdelete-non-virtual-dtor]
> > > >       delete this;
> > > > 
> > > > Below is a patch.
> > > > 
> > > > diff --git a/src/gui_dwrite.cpp b/src/gui_dwrite.cpp
> > > > index 08b81c4..52de208 100644
> > > > --- a/src/gui_dwrite.cpp
> > > > +++ b/src/gui_dwrite.cpp
> > > > @@ -237,7 +237,7 @@ public:
> > > >         AddRef();
> > > >      }
> > > >  
> > > > -    ~GdiTextRenderer()
> > > > +    virtual ~GdiTextRenderer()
> > > >      {
> > > >         SafeRelease(&pRenderTarget_);
> > > >         SafeRelease(&pRenderingParams_);
> > > 
> > > Another option is using "final" specifier as I already posted:
> > > https://groups.google.com/d/msg/vim_dev/ZnGSvwOJZ_4/op_lUvpXEAAJ
> > 
> > The solution with "virtual" is a lot shorter.  And it doesn't require
> > C++11.
> 
> OK, then let's do the same thing with if_ole.cpp:

Alright.

-- 
A law to reduce crime states: "It is mandatory for a motorist with criminal
intentions to stop at the city limits and telephone the chief of police as he
is entering the town.
                [real standing law in Washington, United States of America]

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui