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

Close the video buffer after using it in iOS #89

Merged
merged 4 commits into from
Apr 7, 2024

Conversation

lucas-kakele
Copy link
Contributor

If the buffer is not closed, I believe a memory leak is occurring, and GC runs frequently (once every a few seconds in the device I tested, iPhone 7).

Empirically, I tried using "close" and also "release". The first one did the trick.

This change is also based on the documentation that mentions the buffer should be released after use: https://developer.apple.com/documentation/avfoundation/avplayeritemvideooutput/1386148-copypixelbufferforitemtime#return_value

If the buffer is not closed, I believe a memory leak is occurring, and GC runs frequently (once every a few seconds in the device I tested, iPhone 7).

Empirically, I tried using "close" and also "release". The first one did the trick.

This change is also based on the documentation that mentions the buffer should be released after use: https://developer.apple.com/documentation/avfoundation/avplayeritemvideooutput/1386148-copypixelbufferforitemtime#return_value
@SimonIT SimonIT merged commit dcd0a6a into libgdx:master Apr 7, 2024
3 of 4 checks passed
@lucas-kakele lucas-kakele deleted the patch-1 branch April 8, 2024 13:01
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.

2 participants