Skip to content

Commit 974cec7

Browse files
ywave620targos
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 8743ef5 commit 974cec7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/_http_outgoing.js

+2
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,8 @@ OutgoingMessage.prototype._flushOutput = function _flushOutput(socket) {
12181218
// Refs: https://github.com/nodejs/node/pull/30958
12191219
for (let i = 0; i < outputLength; i++) {
12201220
const { data, encoding, callback } = outputData[i];
1221+
// Avoid any potential ref to Buffer in new generation from old generation
1222+
outputData[i].data = null;
12211223
ret = socket.write(data, encoding, callback);
12221224
}
12231225
socket.uncork();

0 commit comments

Comments
 (0)