http: be more generational GC friendly
Avoid any potential ref to Buffer in new generation from old generation PR-URL: https://github.com/nodejs/node/pull/56767 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
parent
0c0fbfa9c6
commit
c2c6d2b035
@ -1172,6 +1172,8 @@ OutgoingMessage.prototype._flushOutput = function _flushOutput(socket) {
|
||||
// Refs: https://github.com/nodejs/node/pull/30958
|
||||
for (let i = 0; i < outputLength; i++) {
|
||||
const { data, encoding, callback } = outputData[i];
|
||||
// Avoid any potential ref to Buffer in new generation from old generation
|
||||
outputData[i].data = null;
|
||||
ret = socket.write(data, encoding, callback);
|
||||
}
|
||||
socket.uncork();
|
||||
|
Loading…
x
Reference in New Issue
Block a user