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: fix ios reload by observing RCT module invalidate #1649

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mribbons
Copy link

What

Resolves IOS crash on reload

Screenshot 2023-07-12 at 4 19 15 pm

Changes

Store reference to viewTag
Clear CameraView.frameProcessorCallback on RCTBridgeDidInvalidateModulesNotification

Tested on

iPad Pro 2017

Related issues

Fixes #1360

Inspired by
software-mansion/react-native-reanimated#3932

Note that this fix isn't perfect:

  1. There is no further cleanup being done
  2. 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.

@vercel
Copy link

vercel bot commented Jul 12, 2023

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

@mrousavy
Copy link
Owner

Hey thanks for your Pr this is really interesting!

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.

iOS app with frameProcessor crashes after reload 🐛
3 participants