Reputation: 121
My application loads alot of data from a webservice. The problem is, after alot of network requests, it crashes from out of memory.
I'm using the volley library for the network requests, the Universal ImageLoader library for the loading and caching of images.
How do I prevent it from crashing? Is it possible to clean the virtual memory?
Upvotes: 2
Views: 435
Reputation: 754
you can delete volley cache with clear() or set its size manualy Android Volley + JSONObjectRequest Caching
same with Universal ImageLoader library see https://github.com/nostra13/Android-Universal-Image-Loader - configuration
Upvotes: 0
Reputation: 5259
You can't tell JVM (Dalvik in this case) to clean memory "right now", because garbage collector will start (according to JVM specification) when it thinks a good time to do so. What you can do though is this:
Upvotes: 1