The fact is that there is an error on some versions of Android, especially in version 2.1 with errors all the time with such problems.
I released an application in which I paid a lot of attention to the use of resources. I even deleted many of the bitmaps that I used, and now they are created on the fly using graphic primitives. I also process bitmap images when not in use. And, of course, I checked that I have no memory leaks in my application: the memory used is NOT growing without control, it is constantly kept within reasonable limits.
Although I make a lot of efforts to avoid this problem, I continue to receive many annoying exceptions, such as those from devices 2.1 and 2.1-update1. I use critical analysis to report crashes, and I saw that this happens even when the application uses only 4 megabytes of RAM, which is four times less than the 16 MB heap size that every Android device for an application should have, - and the fact is that most devices today have heap sizes over 16 M -.
All my bitmaps are 800x480 pixels in size, which is the worst case scenario since ARGB_8888 may not take up more than 1.5 MB each, but it crashes trying to load it when occupying just 4 megabytes, so there should be at least another 12 MB free. And most of my bitmaps load like ARGB_4444, which takes up half the memory, I only use ARGB_8888 when the bitmaps look really bad with 4444.
So, for me it is pretty clear that on these versions of Android there is something that does not work fine. 99'9% of these failures come from 2.1 and 2.1 updates, and the rest can be explained by other punctual reasons.
Fran Jul 01 '12 at 1:18 2012-07-01 01:18
source share