[android-developers] Re: OutOfMemory exceptions

2011-09-12 Thread moktarul anam
Hi, try to avoid recursive function On Sep 12, 9:01 am, Christopher Van Kirk wrote: > The best strategy here is to figure out why you're running out of memory > and re-architect your code so you don't even come close. This is a cell > phone and tablet OS, not a surface to air missile OS. There's

[android-developers] Re: OutOfMemory exceptions

2011-09-12 Thread Surbhi Dhingra
Hi, I think you should check how you are creating the references because in java we put whole responsibility on GC but by mistake we make some very bad strong references which can lead to outOfMemory exceptions. so try using weak references, have a look on below links http://developer.android.com

Re: [android-developers] Re: OutOfMemory exceptions

2011-09-11 Thread Christopher Van Kirk
The best strategy here is to figure out why you're running out of memory and re-architect your code so you don't even come close. This is a cell phone and tablet OS, not a surface to air missile OS. There's no need to be writing code that pushes the hardware to its absolute limits. On 9/12/201

Re: [android-developers] Re: OutOfMemory exceptions

2011-09-11 Thread Nick Risaro
On Sun, Sep 11, 2011 at 4:11 AM, gjs wrote: > These are typically OutOfMemory errors (not exceptions) which you can > catch in a try catch block, you can then hide these errors from the > user or display a friendly message. > In general you can't do that. If you have an OutOfMemoryError the JVM

[android-developers] Re: OutOfMemory exceptions

2011-09-11 Thread gjs
Hi, These are typically OutOfMemory errors (not exceptions) which you can catch in a try catch block, you can then hide these errors from the user or display a friendly message. Most commonly on this list, they are usually associated with trying to allocate memory for bitmaps that are too large. I