Fix possible RxStore memory leak.

This commit is contained in:
Alex Hart
2022-10-05 12:06:47 -03:00
committed by GitHub
parent 4f3910e3ae
commit ee00e931eb
21 changed files with 63 additions and 13 deletions

View File

@@ -26,6 +26,10 @@ class MediaCaptureViewModel(private val repository: MediaCaptureRepository) : Vi
}
}
override fun onCleared() {
store.dispose()
}
fun onImageCaptured(data: ByteArray, width: Int, height: Int) {
repository.renderImageToMedia(data, width, height, this::onMediaRendered, this::onMediaRenderFailed)
}