Hi,

Is there any more documentation on the behaviour of inPurgable?

http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html#inPurgeable

Specifically, I'd like to know what this option does when used to load a 
medium sized bitmap from the SD card or from APK resources where this bitmap 
is drawn to the screen occasionally using .drawBitmap in an onDraw method. 
The link says:

"If this is set to true, then the resulting bitmap will allocate its pixels 
such that they can be purged if the system needs to reclaim memory. In that 
instance, when the pixels need to be accessed again (e.g. the bitmap is 
drawn, getPixels() is called), they will be automatically re-decoded. For 
the re-decode to happen, the bitmap must have access to the encoded data, 
either by sharing a reference to the input or by making a copy of it."

My interpretation of this is it will either keep a reference to the filename 
the bitmap pixels were loaded from or it will make a copy of the pixels 
somewhere. For the former, can I expect drawBitmap to then perform a 
potentially slow IO operation in my onDraw method if the bitmap was purged? 
For the latter, how is the copy made and what is the memory usage impact of 
this?

Thanks,

Sean

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