I have an app with a service in background. The service runs since the boot, but when the app is started, and closed, the service keeps all the memory that the app uses.

How can I clean all that memory for the service to run light like in the boot ?

有帮助吗?

解决方案

Stop the service, if you are not doing so already (via stopService() or stopSelf()).

After that, your process will eventually be terminated by the OS, when it needs the RAM for other processes.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top