Skip to content

Commit

Permalink
Fix module registry memory leak. (#8282)
Browse files Browse the repository at this point in the history
* Fix module registry memory leak.

* Update CHANGELOG.md
  • Loading branch information
scotthovestadt committed Apr 7, 2019
1 parent 8c92898 commit 650c0b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,8 @@

### Performance

- `[jest-runtime]` Fix module registry memory leak ([#8282](https://github.com/facebook/jest/pull/8282))

## 24.7.1

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-runtime/src/index.ts
Expand Up @@ -517,8 +517,8 @@ class Runtime {
resetModules() {
this._isolatedModuleRegistry = null;
this._isolatedMockRegistry = null;
this._mockRegistry = new Map();
this._moduleRegistry = new Map();
this._mockRegistry.clear();
this._moduleRegistry.clear();

if (this._environment) {
if (this._environment.global) {
Expand Down

0 comments on commit 650c0b5

Please sign in to comment.