Pārlūkot izejas kodu

Merge pull request #64 from phonezawphyo/master

Fix WKWebView memory leak
Thibault Malbranche 6 gadus atpakaļ
vecāks
revīzija
336cdc8559
No account linked to committer's email address
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2
    0
      ios/RNCWKWebView.m

+ 2
- 0
ios/RNCWKWebView.m Parādīt failu

@@ -95,6 +95,8 @@ static NSString *const MessageHanderName = @"ReactNative";
95 95
     [self addSubview:_webView];
96 96
 
97 97
     [self visitSource];
98
+  } else {
99
+    [_webView.configuration.userContentController removeScriptMessageHandlerForName:MessageHanderName];
98 100
   }
99 101
 }
100 102