| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,3 @@ | |||
| 1 | - // Flags: --expose-gc | ||
| 2 | 1 | 'use strict'; | |
| 3 | 2 | ||
| 4 | 3 | // Test that 'close' emits once and not twice when `emitClose: true` is set. | |
@@ -18,8 +17,4 @@ const fileWriteStream = fs.createWriteStream(filepath, { | |||
| 18 | 17 | }); | |
| 19 | 18 | ||
| 20 | 19 | fileReadStream.pipe(fileWriteStream); | |
| 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 | - })); | ||
| 20 | + fileWriteStream.on('close', common.mustCall()); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ const server = net.createServer(common.mustCall(function(conn) { | |||
| 23 | 23 | } | |
| 24 | 24 | ||
| 25 | 25 | while (conn.write(Buffer.from(data))); | |
| 26 | - globalThis.gc({ type: 'major' }); | ||
| 26 | + globalThis.gc({ type: 'minor' }); | ||
| 27 | 27 | // The buffer allocated above should still be alive. | |
| 28 | 28 | } | |
| 29 | 29 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ const server = net.createServer(common.mustCall(function(conn) { | |||
| 21 | 21 | } | |
| 22 | 22 | ||
| 23 | 23 | while (conn.write(data, 'hex')); | |
| 24 | - globalThis.gc({ type: 'major' }); | ||
| 24 | + globalThis.gc({ type: 'minor' }); | ||
| 25 | 25 | // The buffer allocated inside the .write() call should still be alive. | |
| 26 | 26 | } | |
| 27 | 27 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments