Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Release barcode scanner when not in use #991

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

navaronbracke
Copy link
Collaborator

@navaronbracke navaronbracke commented Mar 19, 2024

TODO: test with StrictMode & returnImage: true, since those code paths have changed
TODO: do the same fix for iOS
TODO: remove the assert for analyzeImage()
TODO: let analyzeImage() take the formats from the controller

This PR updates the Android implementation to release the BarcodeScanner when it is no longer used.

It also reflows some blocks of code that could have used early returns and the like.

Fixes #988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StrictMode DiskReadViolation blocking main thread
1 participant