WebView on Android

I ran into a weird crashing bug on our application: when we closed an Activity containing a WebView display, on occasion we’d get a SIGSEGV crash. This reliably happened about one in a half-dozen times.

The fix appears to be to call WebView’s destroy() method on the view inside the Activity during the Activity’s onDestroy:

    protected void onDestroy()
    {
        fWebView.destroy();
        super.onDestroy();
    }

I’m not sure exactly why this is the case. But it appears to resolve my issues.

1 thought on “WebView on Android

Leave a reply to jarro Cancel reply