Check that the pointer returned to you when you allocate memory is non-null. If it's null, you're out of memory. If you're even getting close to the memory limit, though, you're doing something very wrong.

On 9/10/2011 3:20 PM, bob wrote:
How do I tell how much RAM my MetroPCS LG Optimus uses?

I keep getting OutOfMemory exceptions.  Also, what is the most user-
friendly way to handle OutOfMemory exceptions?  Right now, the app
crashes.


--
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

Reply via email to