1
0
Fork 0
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:
fieldingfabian 2022-10-13 14:39:28 +02:00 committed by Fabian Renn-Giles
parent 4c24ee2be0
commit 57b07997d3
2 changed files with 10 additions and 0 deletions

View file

@ -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);

View file

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