You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
Allow garbage collection of processed queue items
Set processed queue items to `null` to allow garbage collection of these items. The command queue contains callbacks. They contain the stack of the current fiber, which can be large. Allow earlier garbage collection of these stacks by removing the reference to the queue items.
This commit is contained in:
@@ -18,7 +18,10 @@ Queue.prototype.shift = function () {
|
||||
return;
|
||||
}
|
||||
}
|
||||
return this.head[this.offset++]; // sorry, JSLint
|
||||
var item = this.head[this.offset];
|
||||
this.head[this.offset] = null;
|
||||
this.offset++;
|
||||
return item;
|
||||
};
|
||||
|
||||
Queue.prototype.push = function (item) {
|
||||
|
Reference in New Issue
Block a user