2

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.

halfer
  • 19,824
  • 17
  • 99
  • 186
neha
  • 6,327
  • 12
  • 46
  • 78

1 Answers1

3

In the onDestroy() of the webview activity destroy the WebView as well. myWebView.destroy();

Varun
  • 33,833
  • 4
  • 49
  • 42