mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Win32: Fix memory leaks in ActiveX and WebBrowserComponent
This commit is contained in:
parent
4c24ee2be0
commit
57b07997d3
2 changed files with 10 additions and 0 deletions
|
|
@ -251,6 +251,11 @@ public:
|
|||
|
||||
~Pimpl() override
|
||||
{
|
||||
// If the wndproc of the ActiveX HWND isn't set back to it's original
|
||||
// wndproc, then clientSite will leak when control is released
|
||||
if (controlHWND != nullptr)
|
||||
SetWindowLongPtr ((HWND) controlHWND, GWLP_WNDPROC, (LONG_PTR) originalWndProc);
|
||||
|
||||
if (control != nullptr)
|
||||
{
|
||||
control->Close (OLECLOSE_NOSAVE);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,10 @@ public:
|
|||
~Win32WebView() override
|
||||
{
|
||||
if (connectionPoint != nullptr)
|
||||
{
|
||||
connectionPoint->Unadvise (adviseCookie);
|
||||
connectionPoint->Release();
|
||||
}
|
||||
|
||||
if (browser != nullptr)
|
||||
browser->Release();
|
||||
|
|
@ -91,6 +94,8 @@ public:
|
|||
handler->Release();
|
||||
}
|
||||
}
|
||||
|
||||
connectionPointContainer->Release();
|
||||
}
|
||||
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue