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: memory leak in module cache management, fixes #560 #567

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

theKashey
Copy link
Collaborator

Summary

smartRequire is cleaning the cache before requiring module, and that might keep reference to an older version, causing a memory leak.

Fix

  • remove module from the cache
  • (added) remove module from parent.children
  • (added) remove module from children.parent

Test plan

The algorithm is borrowed from rewiremock

@theKashey theKashey merged commit c6c3086 into master Jun 5, 2020
@ianvieira
Copy link

@theKashey When will this fixed be released? We are having this issue too but it seems it was not released yet. Do we have an ETA?

@theKashey
Copy link
Collaborator Author

I will try to arrange a new release this weekends. There is one more important PR to merge before everything.

@theKashey theKashey mentioned this pull request Apr 2, 2021
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.

2 participants