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?
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: