Closed some leaked closeable objects
This commit is contained in:
parent
ee8deedd76
commit
fc4f0396a4
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue