mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 03:31:05 +00:00
fix(iOS): webview retain cycle (#1916)
Co-authored-by: sunzhongliang <sunzhongliang@innotechx.com>
This commit is contained in:
co-authored by
sunzhongliang
parent
099087f8d9
commit
30a53d9480
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user