BarcodeScanner does not release resources in `5.read-video-vue`
mattcollier opened this issue · comments
I've made the following simple modifications to the example to demonstrate the behavior here:
By repeating the following steps 5-10 times one can produce the attached performance profile that shows ever increasing resource consumption.
- Scan barcode (image upload is good for demo)
- Hit the "TOGGLE SCANNER" button
- Forcefully run garbage collection using the dev tools
- Hit the "TOGGLE SCANNER" button
- Repeat 5-10 times
After some test, we find it does have memory leak when BarcodeScanner.createInstance()
.
We need to do more research. We may need a few days.
You can temporarily walkaround the problem with a singleton scanner.
It's a bug in SDK. We have fixed it in dynamsoft barcode reader javascript 9.0.
The vue sample has been updated to 9.0.