Closed some leaked closeable objects

This commit is contained in:
Prathamesh More 2022-04-13 11:50:16 +05:30
parent ee8deedd76
commit fc4f0396a4
2 changed files with 4 additions and 2 deletions

View file

@ -111,7 +111,9 @@ class BlurTransformation : BitmapTransformation {
script.forEach(output) script.forEach(output)
output.copyTo(out) output.copyTo(out)
output.destroy()
script.destroy()
input.destroy()
rs.destroy() rs.destroy()
return out return out

View file

@ -102,7 +102,7 @@ class RealGenreRepository(
private fun getGenresFromCursor(cursor: Cursor?): ArrayList<Genre> { private fun getGenresFromCursor(cursor: Cursor?): ArrayList<Genre> {
val genres = arrayListOf<Genre>() val genres = arrayListOf<Genre>()
if (cursor != null) { cursor?.use {
if (cursor.moveToFirst()) { if (cursor.moveToFirst()) {
do { do {
val genre = getGenreFromCursor(cursor) val genre = getGenreFromCursor(cursor)