Reputation: 1238
Do Bitmaps automatically get recycled when an activity finish()
?
Or do we have to call recycle()
the bitmaps in onDestroy()
?
Upvotes: 3
Views: 1158
Reputation: 4233
On Pre-honeycomb device
recycle()
or finalizer()
needed to restore memoryOn Post honeycomb its standard like any java object
Upvotes: 0
Reputation: 157457
In the Pre Android 3.0 you need to recycle
it, because the bitmap is stored in the native heap
.
Upvotes: 4
Reputation: 39846
as long as you're not referencing them by any still alive object: they get garbage collected by the GC without any need to further interaction.
Upvotes: 2