Make destructors of COM interface classes virtual.

This is needed to at least silence g++ warnings but may actually even fix a
real problem as these classes can be inherited from and are deleted via a
pointer (to "this" itself, in Release() implementation).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-07-12 14:12:35 +00:00
parent 2aa54d47d6
commit 9fe7a9ad57

View File

@@ -221,7 +221,7 @@ protected:
public:
VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler);
~VirtualProtocol() {}
virtual ~VirtualProtocol() {}
//IUnknown
DECLARE_IUNKNOWN_METHODS;
@@ -257,6 +257,7 @@ class ClassFactory : public IClassFactory
public:
ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler)
{ AddRef(); }
virtual ~ClassFactory() {}
wxString GetName() { return m_handler->GetName(); }
@@ -286,7 +287,7 @@ class DocHostUIHandler : public wxIDocHostUIHandler
{
public:
DocHostUIHandler(wxWebView* browser) { m_browser = browser; }
~DocHostUIHandler() {};
virtual ~DocHostUIHandler() {}
virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt,
IUnknown *pcmdtReserved,