Question

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 ?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top