Skip to content

Commit

Permalink
将软引用改为弱引用
Browse files Browse the repository at this point in the history
  • Loading branch information
pedant committed Dec 25, 2014
1 parent 40d9b35 commit 8679f7b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public class JsCallback {
private static final String CALLBACK_JS_FORMAT = "javascript:%s.callback(%d, %d %s);";
private int mIndex;
private boolean mCouldGoOn;
private SoftReference<WebView> mWebViewRef;
private WeakReference<WebView> mWebViewRef;
private int mIsPermanent;
private String mInjectedName;

public JsCallback (WebView view, String injectedName, int index) {
mCouldGoOn = true;
mWebViewRef = new SoftReference<WebView>(view);
mWebViewRef = new WeakReference<WebView>(view);
mInjectedName = injectedName;
mIndex = index;
}
Expand Down Expand Up @@ -62,4 +62,4 @@ public JsCallbackException (String msg) {
super(msg);
}
}
}
}

0 comments on commit 8679f7b

Please sign in to comment.