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(backport): memory leaks due to timer references outliving the timers (#2773) #2773

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

johnp
Copy link
Contributor

@johnp johnp commented Aug 19, 2024

Simply backports the fix for #2771 to the main branch / v13. Should be worth it & low risk enough I think.

…2773)

* fix: remove unused setInterval spy

* fix: delete timer references after callback

This way we don't hold any strong reference to potentially
large setTimeout/setImmediate contexts any more.

Since we use neither `clearTimeout`, nor `clearImmediate`,
we can just ignore those cases and don't need to install
spies to handle deliberate clears.
@mikicho
Copy link

mikicho commented Aug 20, 2024

Thanks! 🎉

@mikicho mikicho merged commit 66eb7f4 into nock:main Aug 20, 2024
20 checks passed
Copy link

🎉 This PR is included in version 13.5.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Dec 4, 2024

🎉 This PR is included in version 14.0.0-beta.19 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants