Properly destroy WebView
This commit is contained in:
parent
7aaf6d1771
commit
f2aa6d6e5c
@ -552,7 +552,10 @@ public class LightningView {
|
|||||||
mWebView.setVisibility(View.GONE);
|
mWebView.setVisibility(View.GONE);
|
||||||
mWebView.removeAllViews();
|
mWebView.removeAllViews();
|
||||||
mWebView.destroyDrawingCache();
|
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;
|
mWebView = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user