You should at least have an idea/logs on the methods which creates OOM, you can encapsulate into a :
try { bigMethod(); } catch(java.lang.OutOfMemoryError e) { all objects = null; System.gc(); System.runFinalization(); } Maybe you can also use : Runtime.getRuntime().freeMemory() Runtime.getRuntime().maxMemory() Runtime.getRuntime().totalMemory () to know if you have to stop what you are doing : properly. -- 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 To unsubscribe, reply using "remove me" as the subject.