Skip to content

Commit b354010

Browse files
authored
Recycle bitmap after extracting RGB values
1 parent 65c08d7 commit b354010

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo

llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/ETImage.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class ETImage(
7878
rgbValues[(y * width + x) + 2 * height * width] = blue.toByte()
7979
}
8080
}
81+
bitmap.recycle()
8182
return rgbValues
8283
} catch (e: FileNotFoundException) {
8384
throw RuntimeException(e)

0 commit comments

Comments
 (0)