Skip to content

fix(core): avoid leaking view data in animations#66256

Merged
kirjs merged 1 commit intoangular:mainfrom
crisbeto:66255/lview-potential-leaks
Jan 7, 2026
Merged

fix(core): avoid leaking view data in animations#66256
kirjs merged 1 commit intoangular:mainfrom
crisbeto:66255/lview-potential-leaks

Conversation

@crisbeto
Copy link
Copy Markdown
Member

The animations code currently tracks which views have running leave animations by adding them to a Set. This can leak memory if we don't clean something up on time.

These changes switch to tracking the views by their ID which doesn't risk retaining the view.

Fixes #66255.

The animations code currently tracks which views have running leave animations by adding them to a `Set`. This can leak memory if we don't clean something up on time.

These changes switch to tracking the views by their ID which doesn't risk retaining the view.

Fixes angular#66255.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Dec 26, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Dec 26, 2025
@ngbot ngbot bot added this to the Backlog milestone Dec 26, 2025
Copy link
Copy Markdown
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

Ah good idea! Thanks for this.

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 5, 2026
@kirjs kirjs merged commit 80b0fbb into angular:main Jan 7, 2026
25 checks passed
@kirjs
Copy link
Copy Markdown
Contributor

kirjs commented Jan 7, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@bukharin
Copy link
Copy Markdown

bukharin commented Jan 7, 2026

@crisbeto could you backport this fix to 20.x branch?

@JeanMeche
Copy link
Copy Markdown
Member

Per our API policy, we only backport security fixes to versions that are in LTS.

https://angular.dev/reference/releases#lts-fixes

@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(animate.leave) produces memory leaks

5 participants