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 a potential memory leak if a render step pauses for a long time. #2944

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

onnlucky
Copy link
Contributor

@onnlucky onnlucky commented Dec 13, 2024

Motion can hold on to user memory, potentially for a long time, if a render step doesn't have work to do for a long while.

This caused some trouble for us, where through callbacks and closures, this would hold on to old tree data, after a tree was reloaded from the server. Doubling memory use.

image

This PR simply clears the thisFrame set the moment it is no longer needed. Fixing the problem for us.

@mattgperry
Copy link
Collaborator

Wow a wild @onnlucky appears. Great fix, thanks!

@mattgperry mattgperry merged commit 47d5524 into motiondivision:main Dec 13, 2024
4 checks passed
@onnlucky onnlucky deleted the fix/memory-leak branch January 6, 2025 08:48
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