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 Tweener leak on Animation #26143

Merged
merged 3 commits into from
Dec 4, 2024
Merged

Conversation

pictos
Copy link
Contributor

@pictos pictos commented Nov 27, 2024

Description of Change

This PR is a piece of #25232, that is a WiP to fix memories leaks on Animation.

This PR prevents the Tweener to live forever and the s_tweeners collection to grow forever.

Issues Fixed

Fixes #25001

@pictos pictos requested a review from a team as a code owner November 27, 2024 06:54
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 27, 2024
Copy link
Contributor

Hey there @pictos! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jsuarezruiz
Copy link
Contributor

/azp run

@jsuarezruiz jsuarezruiz added area-animation Animation, Transitions, Transforms memory-leak 💦 Memory usage grows / objects live forever (sub: perf) labels Nov 27, 2024
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho requested review from jonathanpeppers and PureWeen and removed request for Eilon November 27, 2024 11:52
Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we port the unit test to this PR too ?

@pictos
Copy link
Contributor Author

pictos commented Nov 27, 2024

@rmarinho the unit tests aren't related to this change. The s_tweeners is private and there's no public/internal member that exposes its Count property, I can't see a way to test but always open to ideas.

The tests in previous PR are related to Animation leak object, and it's possible to test because we can see the leak in public members or the control that implements the animation

Co-authored-by: MartyIX <[email protected]>
@rmarinho
Copy link
Member

Can we add a test to check the public Tweener leaks or not ? do we make s_tweeners internal ?

@pictos
Copy link
Contributor Author

pictos commented Nov 28, 2024

@rmarinho I added a property to expose the s_tweeners.Count as discussed with @PureWeen, so I believe it's good to go

@dotnet dotnet deleted a comment from azure-pipelines bot Nov 28, 2024
@PureWeen PureWeen added this to the .NET 9 SR2 milestone Nov 29, 2024
@PureWeen PureWeen merged commit 872de49 into dotnet:main Dec 4, 2024
104 checks passed
@pictos pictos deleted the pj/fix-tweener-leak branch December 4, 2024 00:40
@samhouts samhouts added fixed-in-9.0.21 fixed-in-net8.0-nightly This may be available in a nightly release! labels Dec 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-animation Animation, Transitions, Transforms community ✨ Community Contribution fixed-in-9.0.21 fixed-in-net8.0-nightly This may be available in a nightly release! memory-leak 💦 Memory usage grows / objects live forever (sub: perf)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Memory leak in animations
6 participants