Store a pointer to each ClassFactory so we can correctly release it when the browser closes. This fixes a few more memory leaks.

See #13500

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-10-05 17:23:51 +00:00
parent 24fb46ea48
commit 3949871086
3 changed files with 13 additions and 0 deletions

View File

@@ -77,6 +77,13 @@ bool wxWebViewIE::Create(wxWindow* parent,
return true;
}
wxWebViewIE::~wxWebViewIE()
{
for(unsigned int i = 0; i < m_factories.size(); i++)
{
m_factories[i]->Release();
}
}
void wxWebViewIE::LoadURL(const wxString& url)
{
@@ -684,6 +691,7 @@ void wxWebViewIE::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
{
wxFAIL_MSG("Could not register protocol");
}
m_factories.push_back(cf);
}
else
{