Showing
1 changed file
with
3 additions
and
0 deletions
| @@ -41,6 +41,7 @@ import kotlinx.coroutines.coroutineScope | @@ -41,6 +41,7 @@ import kotlinx.coroutines.coroutineScope | ||
| 41 | import kotlinx.coroutines.launch | 41 | import kotlinx.coroutines.launch |
| 42 | import java.io.ByteArrayOutputStream | 42 | import java.io.ByteArrayOutputStream |
| 43 | import kotlin.math.roundToInt | 43 | import kotlin.math.roundToInt |
| 44 | + | ||
| 44 | class MobileScanner( | 45 | class MobileScanner( |
| 45 | private val activity: Activity, | 46 | private val activity: Activity, |
| 46 | private val textureRegistry: TextureRegistry, | 47 | private val textureRegistry: TextureRegistry, |
| @@ -149,8 +150,10 @@ class MobileScanner( | @@ -149,8 +150,10 @@ class MobileScanner( | ||
| 149 | val byteArray = stream.toByteArray() | 150 | val byteArray = stream.toByteArray() |
| 150 | val bmWidth = bmResult.width | 151 | val bmWidth = bmResult.width |
| 151 | val bmHeight = bmResult.height | 152 | val bmHeight = bmResult.height |
| 153 | + | ||
| 152 | bmResult.recycle() | 154 | bmResult.recycle() |
| 153 | imageProxy.close() | 155 | imageProxy.close() |
| 156 | + | ||
| 154 | mobileScannerCallback( | 157 | mobileScannerCallback( |
| 155 | barcodeMap, | 158 | barcodeMap, |
| 156 | byteArray, | 159 | byteArray, |
-
Please register or login to post a comment