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 VoxelGI bake memory leak #83035

Merged

Conversation

bitsawer
Copy link
Member

@bitsawer bitsawer commented Oct 9, 2023

Currently, every time you bake a VoxelGI node it leaks the temporary 3D SDF data. Depending on voxel configuration this is often 20 to 30 megabytes in size, so it adds up quicky.

This PR simply frees the temporary memory allocation at the end of the function, which fixes the leak.

@bitsawer bitsawer added this to the 4.2 milestone Oct 9, 2023
@bitsawer bitsawer requested a review from a team October 9, 2023 09:47
@bitsawer bitsawer requested a review from a team as a code owner October 9, 2023 09:47
@akien-mga akien-mga added the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Oct 9, 2023
@akien-mga akien-mga merged commit 42425ba into godotengine:master Oct 9, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@bitsawer bitsawer deleted the fix_voxelgi_bake_memory_leak branch October 9, 2023 15:33
@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Oct 24, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants