animationFrames() has memory leak.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31.7k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
animationFrames will add subscriptions again again before unsubscribe.
Expected behavior
Here I describe the problem.
I can't find the logic of removing sub subscription inside animationFrames.
So I add this to source code in Subscription class.

Add this to project code.

You will see this.

Shouldn't they be removed from array:this._finalizers over time???
Reproduction code
As shown in the prev section.
Reproduction URL
No response
Version
7.5.5
Environment
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported animationFrames behavior in RxJS 7.5.5 and inspect how Subscription manages its _finalizers during repeated subscriptions and unsubscribe. The issue has no runnable reproduction or named test; done should mean confirming that repeated animationFrames subscriptions no longer accumulate after unsubscribe, with a regression test covering that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100