fix(iOS): webview retain cycle (#1916)

Co-authored-by: sunzhongliang <sunzhongliang@innotechx.com>
This commit is contained in:
sunzhongliang
2021-03-15 10:19:45 +01:00
committed by GitHub
co-authored by sunzhongliang
parent 099087f8d9
commit 30a53d9480
+1
View File
@@ -331,6 +331,7 @@ static NSDictionary* customCertificatesForHost;
- (void)removeFromSuperview
{
if (_webView) {
[_webView.configuration.userContentController removeScriptMessageHandlerForName:HistoryShimName];
[_webView.configuration.userContentController removeScriptMessageHandlerForName:MessageHandlerName];
[_webView removeObserver:self forKeyPath:@"estimatedProgress"];
[_webView removeFromSuperview];