Reputation: 6377
In my hybrid Android application, on a ListView
item click I'm loading a WebView
by passing the WebView
activity with the url to display in it. The user can come back to the earlier view by clicking back button.
But what is happening is after clicking on 3-4 ListView
items, the app is becoming slow, which I think is because WebView
activity is loaded again and again without deallocating it.
Upvotes: 2
Views: 944
Reputation: 33983
In the onDestroy() of the webview activity destroy the WebView as well. myWebView.destroy();
Upvotes: 3