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

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s