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

Replace memory allocation point of ValueTrack correctly in AnimationMixer #85001

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

alesliehughes
Copy link
Contributor

No description provided.

scene/animation/animation_mixer.cpp Outdated Show resolved Hide resolved
scene/animation/animation_mixer.cpp Outdated Show resolved Hide resolved
@AThousandShips AThousandShips added this to the 4.x milestone Nov 17, 2023
@alesliehughes
Copy link
Contributor Author

I'll fix the commit up shortly. Didn't mean to create a second commit.

@TokageItLab
Copy link
Member

Okay, please squash later.

@alesliehughes alesliehughes force-pushed the anim_mixer_leak branch 2 times, most recently from 9beb3c0 to 33e253d Compare November 17, 2023 10:43
@TokageItLab TokageItLab changed the title Fix memory leaks in Animation mixer Replace memory allocation point of ValueTrack correctly in AnimationMixer Nov 17, 2023
@TokageItLab TokageItLab modified the milestones: 4.x, 4.3 Nov 28, 2023
@TokageItLab TokageItLab requested a review from akien-mga December 9, 2023 07:56
@akien-mga akien-mga added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Dec 9, 2023
@akien-mga
Copy link
Member

@alesliehughes It's not obvious to me what this does, could you add more details on what the bug is in the PR description?

@alesliehughes
Copy link
Contributor Author

@alesliehughes It's not obvious to me what this does, could you add more details on what the bug is in the PR description?

When a animation track doesn't have an keys, it's possible that we leak memory due the ERR_CONTINUE_MSG macro usage.

By checking the error condition first, we avoid a allocated and thus the leak.

I'll update the patch with the above.

…ixer

When a animation track doesn't have an keys, it's possible that we leak memory due the ERR_CONTINUE_MSG macro usage.

By checking the error condition first, we avoid a allocation and thus the leak.
@akien-mga akien-mga merged commit 1f3c16d into godotengine:master Dec 11, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jan 25, 2024
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.2.2.

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.

6 participants