From f67ee53bb7feef264f910ffa72a860e233cf3876 Mon Sep 17 00:00:00 2001 From: Aid Vllasaliu Date: Sat, 21 Dec 2024 09:00:53 +0100 Subject: [PATCH] Fix memory leak in WebView message handling --- .../juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp b/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp index 5406ea40bad..53cbcabf707 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp @@ -915,6 +915,7 @@ class WebBrowserComponent::Impl::Platform::WebView2 final : public WebBrowserCom args->TryGetWebMessageAsString (std::addressof (message)) == S_OK) { owner.impl->handleNativeEvent (JSON::fromString (StringRef { CharPointer_UTF16 (message) })); + CoTaskMemFree(message); } return S_OK;