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(ios): fix pip memory leak #3506

Merged
merged 2 commits into from
Jan 30, 2024
Merged

fix(ios): fix pip memory leak #3506

merged 2 commits into from
Jan 30, 2024

Conversation

KrzysztofMoch
Copy link
Member

Summary

Fix memory leak caused by pip (RCTPictureInPicture).
Seems like RCTPictureInPicture hold strong reference to RCTVideo. With this change I was able to call deinit on component unmount

should fix #3505 #3399

Test Plan

  • Tested in example

@KrzysztofMoch KrzysztofMoch merged commit 53068dd into TheWidlarzGroup:master Jan 30, 2024
6 checks passed
@KrzysztofMoch KrzysztofMoch deleted the fix/ios-pip-memory-leak branch January 30, 2024 07:33
Copy link

@xiao99xiao xiao99xiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since _pip is declared inside a platform condition statement, _pip = nil should be wrapped by such condition as well.
Just noticed it's fixed in the latest code.

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 - Picture in picture preventing video instances being released after unmount, eventually crashes
3 participants