Took a little while to figure out what they’re talking about, this is what I think it is:
use purgeable bitmaps so that the app survives low memory conditions
use lockPixels to pin known-to-be-alive bitmaps to memory
use unlockPixels to unpin known-to-be-dead bitmaps
Then, the GC and ashmem will work to your advantage, and also you don’t have to suffer UI jank when an alive-but-purged bitmap is drawn on screen. (Which causes the costly bitmap decode operation to be run on the UI thread)
Took a little while to figure out what they’re talking about, this is what I think it is:
lockPixelsto pin known-to-be-alive bitmaps to memoryunlockPixelsto unpin known-to-be-dead bitmapsThen, the GC and ashmem will work to your advantage, and also you don’t have to suffer UI jank when an alive-but-purged bitmap is drawn on screen. (Which causes the costly bitmap decode operation to be run on the UI thread)