Java – background process that programmatically clears the cache

I have developed a simple application that can load four mobile web views side by side. After a new installation, the application will fully open and load these pages in 0.5 seconds. However, if I minimize this application, for some reason, its "cached background process" exceeds 200mbs! Sometimes 250... Seems completely unnecessary because the application loads quickly when it is newly installed

How to clear this cache when the application is minimized (onbackpressed, etc.)

resolvent:

You don't have to worry about cached memory because the system reclaims it when needed

However, if you still want to do this, you can call finish () in the onStop () method.

Also by @ L_ 419_ 1 @ this is a great answer on this topic

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>