开发者

Webview building up the memory in Android

开发者 https://www.devze.com 2023-01-29 09:05 出处:网络
In my hybrid Android application, o开发者_运维百科n 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 vi

In my hybrid Android application, o开发者_运维百科n 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号