Browse Source

Properly destroy WebView

master
Anthony Restaino 9 years ago
parent
commit
f2aa6d6e5c
  1. 5
      app/src/main/java/acr/browser/lightning/view/LightningView.java

5
app/src/main/java/acr/browser/lightning/view/LightningView.java

@ -552,7 +552,10 @@ public class LightningView { @@ -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;
}
}

Loading…
Cancel
Save