Properly destroy WebView

This commit is contained in:
Anthony Restaino 2015-10-24 14:32:39 -04:00
parent 7aaf6d1771
commit f2aa6d6e5c

View File

@ -552,7 +552,10 @@ public class LightningView {
mWebView.setVisibility(View.GONE);
mWebView.removeAllViews();
mWebView.destroyDrawingCache();
// mWebView.destroy(); //this is causing the segfault
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
//this is causing the segfault occasionally below 4.2
mWebView.destroy();
}
mWebView = null;
}
}