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

Co-authored-by: sunzhongliang <sunzhongliang@innotechx.com>
This commit is contained in:
sunzhongliang 2021-03-15 17:19:45 +08:00 committed by GitHub
parent 099087f8d9
commit 30a53d9480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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];