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;