Prior to 3.0, all bitmaps are allocated in a separate heap, called the
native heap.
You should be able to keep track of how much your application allocates
/ frees there in your image loading code.
There are also methods to get the native heap stats with Debug class:
http://developer.android.com/reference/android/os/Debug.html#getNativeHeapFreeSize()
It helps to call recycle() on those images your application no longer
needs (perhaps by keeping your own MRU list).
-- Kostya
23.07.2011 15:06, Simon Platten пишет:
Is there a method or object I can override that will root all the
memory allocation performed by my application through to something I
can control...this would include any views and objects I reference. I
have a problem where a background thread loads images in the
background, as I scroll through the list view, if I scroll quickly it
can sometimes bomb the applications. Checking the log it appears the
application is running out of heapspace. The application is ok, but I
want to capture this find of thing to prevent the application from
crashing out.
--
Regards,
Sy
--
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
--
Kostya Vasilyev
--
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