Reputation: 66
I created an application that creates a background service. When I close the application the service is running and when I go back to get it back to "bind" (bindService) to it for communications.
The problem is that when I close the application and re-enter, it significantly increases the memory in use. Spend 20Mb -> 24Mb, if I go out and come 24Mb -> 28Mb, 28Mb -> 30Mb ... Thus breaking up the application. I have no bitmaps. That if enough use static arrays but I've tested and are not the source of the problem.
When I close the application completely (including service) call System.exit(0) and clean all the memory, but of course, I can call when I leave the service running as it closes. I tried to call the Garbage Collector (System.gc()) and if I notice that memory decreases to close, but when you open the application again same memory increases.
I would greatly appreciate the help, Bye!
Upvotes: 0
Views: 793
Reputation: 2554
Considering information we have, I suspect the problem is an Activity leak. Can you please check 2 things:
Upvotes: 1