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 two memory leaks #77

Merged
merged 2 commits into from
Dec 8, 2020
Merged

Fix two memory leaks #77

merged 2 commits into from
Dec 8, 2020

Conversation

alexk111
Copy link
Contributor

@alexk111 alexk111 commented Dec 8, 2020

1st leak comes from Debug module, when debug instances are created within a function. For more info: debug-js/debug#678

2nd leak is caused by createClientRequestOverrideClass, when handleRequest is called multiple times (check screenshot below). It inherits ClientRequestOverride from a previous ClientRequestOverride instance:

Maybe I'm missing something and you intentionally inherited it from http.ClientRequest instead of originalClientRequest?

image

Copy link

@shanecurran shanecurran left a comment

Choose a reason for hiding this comment

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

Good catch 👍

Copy link
Member

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

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

This is a great improvement! Thank you, @alexk111, for investigating this and shipping a fix. You're awesome!

@kettanaito kettanaito merged commit 00c1d09 into mswjs:master Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants