Skip to content

Fix iOS Camera Texture memory leak on dispose #1135

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

Merged
merged 3 commits into from
Sep 14, 2022

Conversation

Alex-MSFT
Copy link
Contributor

@Alex-MSFT Alex-MSFT commented Sep 13, 2022

The current implementation of the cameraTextureDelegate was taking a strong reference to the implData object, which was preventing the destructor from being run on camera close. This PR adds a small cleanup protocol to cleanly handle deallocation, and removes the circular reference.

Before:
Screen Shot 2022-09-13 at 10 39 43 AM

After:
Screen Shot 2022-09-13 at 11 50 13 AM

@Alex-MSFT Alex-MSFT merged commit 6bb498c into BabylonJS:master Sep 14, 2022
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.

4 participants