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

Regards,
Ken Takata

-- 
-- 
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