My application has a lot of images and sometimes it crashes due to low memory.
I wrote this function that I found on the developer site.
public void onLowM
My application has a lot of images and sometimes it crashes due to low memory
That part is not clear, if your application is downloading any image from internet or end user picking image from gallery and adding it? In this case
Or better you can remove the image from memory yourself using any algorithm(how about least recently used/viewed?)
Another case is your application itself is using too much memory because of unneeded references and leaks..This case you never warn the user that there is no more memory..It is simply your responsibility to effectively use memory...This case normally arises mainly when
In any case, it is unwise to alert user of low memory..A programmer should always program thinking you can make the app better by using less memory..
This thread will be very useful to know about your memory footprint inforamation..
And about usage of MAT tool...