Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix issue with race-condition in SkiaDrawView on iOS #71

Closed
chrfalch opened this issue Dec 29, 2021 · 0 comments · Fixed by #72
Closed

Fix issue with race-condition in SkiaDrawView on iOS #71

chrfalch opened this issue Dec 29, 2021 · 0 comments · Fixed by #72
Assignees

Comments

@chrfalch
Copy link
Contributor

On iOS the process of removing and unregistering a SkiaView is a bit more complicated than on Android, since the iOS RCTViewManager does not have a notification for a view removal. This causes a memory leak and we need to track adding/removing the SkiaView by using the willMoveToWindow on the wrapping UIView. This causes some issues with the implementation of the RNSkDrawView not being available when we create/remove the view (ex. in navigation transitions). In addition all of this can cause a race condition where the view is removed while it has a pending draw request that will be executed after the view was removed.

We need to solve a few things here

  • Implement correct tracking of view add/remove using the willMoveToWindow method
  • Refactor some of the RNSk code to support adding removing an implementation view without removing callbacks etc
  • Refactor how we track removal and draw requests to support this scheme
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant