| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0e999eb commit 92dce6e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,4 @@ | |||
| 1 | + // Flags: --expose-gc | ||
| 1 | 2 | 'use strict'; | |
| 2 | 3 | ||
| 3 | 4 | // Test that 'close' emits once and not twice when `emitClose: true` is set. | |
@@ -17,4 +18,8 @@ const fileWriteStream = fs.createWriteStream(filepath, { | |||
| 17 | 18 | }); | |
| 18 | 19 | ||
| 19 | 20 | fileReadStream.pipe(fileWriteStream); | |
| 20 | - fileWriteStream.on('close', common.mustCall()); | ||
| 21 | + fileWriteStream.on('close', common.mustCall(() => { | ||
| 22 | + // TODO(lpinca): Remove the forced GC when | ||
| 23 | + // https://github.com/nodejs/node/issues/54918 is fixed. | ||
| 24 | + globalThis.gc({ type: 'major' }); | ||
| 25 | + })); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments