Search code examples
androidbitmapmonoxamarin.androiddispose

MonoDroid: About Bitmap.Recycle() and Bitmap.Dispose()


Do I still need to call Bitmap.Dispose() after Bitmap.Recycle()? Or just Bitmap.Dispose() is enough?


Solution

  • According to Android documentation Bitmap.Recycle() should be enough:

    Free the native object associated with this bitmap, and clear the reference to the pixel data.

    Mono for Android documentation says exactly the same.

    Also, this question gets a little further on how Bitmap.Recycle works.