react-native-vision-camera
react-native-vision-camera copied to clipboard
fix: fix ios reload by observing RCT module invalidate
What
Resolves IOS crash on reload
Changes
Store reference to viewTag
Clear CameraView.frameProcessorCallback on RCTBridgeDidInvalidateModulesNotification
Tested on
iPad Pro 2017
Related issues
Fixes https://github.com/mrousavy/react-native-vision-camera/issues/1360
Inspired by https://github.com/software-mansion/react-native-reanimated/pull/3932
Note that this fix isn't perfect:
- There is no further cleanup being done
- There is definitively a memory leak
However despite this it should improve things considerably (Until v3), I was able to get around 15 reloads with no memory issues.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| react-native-vision-camera | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 12, 2023 6:39am |
Hey thanks for your Pr this is really interesting!