0

My app is crashing after longer use - runs out of memory. I am closing all activities after switching to next one, but I still have that problem.
Is it possible to programmatically clear cache / memory, so application does not run out resources? Can I use getCacheDir() to accomplish that?

Peter
  • 909
  • 1
  • 9
  • 9

1 Answers1

0

Apparently your app is leaking memory. Make sure you clean up unused resources, close databases, reuse variables, etc.

Also refer to this post on how to track down memory leaks and how to avoid them.

Community
  • 1
  • 1
Will Kru
  • 5,164
  • 3
  • 28
  • 41