From 8eacc92b85b710a9b077a2a0271009e9c3fbbef9 Mon Sep 17 00:00:00 2001 From: Michael Tamburro <61243400+msmtamburro@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:26:01 -0400 Subject: [PATCH] fix: the WKWebView will leak in the platform centered approach unless this property is cleared (#1486) (#1497) --- .../Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m | 1 + 1 file changed, 1 insertion(+) diff --git a/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m index 91bc1b838..88f2d9a9d 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m +++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m @@ -273,6 +273,7 @@ - (void)dispose { WKWebView* wkWebView = (WKWebView*)_engineWebView; [wkWebView.configuration.userContentController removeScriptMessageHandlerForName:CDV_BRIDGE_NAME]; + _engineWebView = nil; [super dispose]; }