Browse Source

Win32: Fix memory leaks in ActiveX and WebBrowserComponent

v7.0.9
fieldingfabian Fabian Renn-Giles 2 years ago
parent
commit
57b07997d3
2 changed files with 10 additions and 0 deletions
  1. +5
    -0
      modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp
  2. +5
    -0
      modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp

+ 5
- 0
modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp 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);


+ 5
- 0
modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp 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


Loading…
Cancel
Save