Android – Simple Tips – Bitmap Memory Leaks

Uncategorized
The Problem Java uses garbage collection to manage memory. This does not mean that memory leaks never happen. They do. Bitmaps are one area where memory leaks can occur when creating and Android application. What Android Developers Has To Say "On Android Android 2.2 (API level 8) and lower, when garbage collection occurs, your app's threads get stopped. This causes a lag that can degrade performance.¬†Android 2.3 adds concurrent garbage collection, which means that the memory is reclaimed soon after a bitmap is no longer referenced On Android 2.3.3 (API level 10) and lower, the backing pixel data for a bitmap is stored in native memory. It is separate from the bitmap itself, which is stored in the Dalvik heap. The pixel data in native memory is not released in…
Read More