Skip to content

Commit 02373ba

Browse files
ywave620marco-ippolito
authored andcommitted
http: be more generational GC friendly
Avoid any potential ref to Buffer in new generation from old generation PR-URL: #56767 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
1 parent ef47978 commit 02373ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/_http_outgoing.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,8 @@ OutgoingMessage.prototype._flushOutput = function _flushOutput(socket) {
11721172
// Refs: https://github.com/nodejs/node/pull/30958
11731173
for (let i = 0; i < outputLength; i++) {
11741174
const { data, encoding, callback } = outputData[i];
1175+
// Avoid any potential ref to Buffer in new generation from old generation
1176+
outputData[i].data = null;
11751177
ret = socket.write(data, encoding, callback);
11761178
}
11771179
socket.uncork();

0 commit comments

Comments
 (0)