Well, it is true there is no fix answer for that problem. I used to have to deal with this exception quite a lot at the beginning. Then I discovered the "magic" tool "memory analysis" and cleaned my code. So now, I'm not getting that OutOfMemoryException due to my code. Mostly, what I did was releasing manually all the bitmaps every time my activity went to the background, and being sure to finish the activities I didnt need, specially those with large bitmaps on it. So, yeah, in my opinion, there is no a general solution for this problem but you have to adapt your code and make it clear and simple.
On Jun 8, 3:47 pm, Thender <thender...@gmail.com> wrote: > Hi Folks, > > I'm new, so be gentle. > > I've been reading all the other posts about OOM and > OutOfMemoryException. > > Its seems I can't discover a good way to deal with impending memory > exhaustion, and neither can anyone else. > > It would be great to confirm that I should stop trying. > > The essence is that as my code approaches the cliff, I can't find any > way to back away from the cliff from within my own code. It seems I > am doomed to be pushed over at some point, and will be caught only by > the system itself without an opportunity to tell my user what > happened. > > What I observe is that by the time my code has caught an > OutOfMemoryError, The VM is being shut down. Thus my plans to inform > and gracefully exit are foiled. > > Is this simply the state of affairs with Java on Android, or am I > missing something. > > Thanks > > thender.th > > PS: It is also apparent the the available bits of information about > allocated memory cannot be relied upon to keep you away from the edge > of the cliff. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en