mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
1 parent
8743ef525d
commit
974cec7a0a
1 file changed
+2
@@ -1218,6 +1218,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();
|
||||
|
||||
Reference in new issue
Block a user