We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40d9b35 commit 8679f7bCopy full SHA for 8679f7b
library/src/main/java/cn/pedant/SafeWebViewBridge/JsCallback.java
@@ -17,13 +17,13 @@ public class JsCallback {
17
private static final String CALLBACK_JS_FORMAT = "javascript:%s.callback(%d, %d %s);";
18
private int mIndex;
19
private boolean mCouldGoOn;
20
- private SoftReference<WebView> mWebViewRef;
+ private WeakReference<WebView> mWebViewRef;
21
private int mIsPermanent;
22
private String mInjectedName;
23
24
public JsCallback (WebView view, String injectedName, int index) {
25
mCouldGoOn = true;
26
- mWebViewRef = new SoftReference<WebView>(view);
+ mWebViewRef = new WeakReference<WebView>(view);
27
mInjectedName = injectedName;
28
mIndex = index;
29
}
@@ -62,4 +62,4 @@ public JsCallbackException (String msg) {
62
super(msg);
63
64
65
-}
+}
0 commit comments