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 <paolo@cowtech.it> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
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

Lines changed: 2 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy