I'm new to android, so I don't have much experience with memory management. I don't explicitly cache any data myself, but for some reason my app uses a lot of cache memory. My app deals with a lot of bitmaps, so I can see why, but I don't know how to curtail this or keep it down. How do I restrict the amount of cache my program uses, and periodically clear the cache?
Asked
Active
Viewed 271 times
1
-
Show your code to let us reproduce the problem. – Joshua Sep 07 '16 at 06:44
-
1It isn't a specific reproducible example that happens in one particular class or method. I can't post my whole app here unfortunately. I was looking for general advice on managing cache and reducing cache memory consumed. – Dhruv Devulapalli Sep 07 '16 at 06:47
-
The simplest way is not loading the full size of the bitmap. Use `BitmapFactory` to control the loaded size. – Joshua Sep 07 '16 at 06:50
-
I use Glide to load my bitmaps, but I've set my glide parameters to not use the cache – Dhruv Devulapalli Sep 07 '16 at 06:52