destroy buffers.
This commit is contained in:
parent
e31a4527b4
commit
f5142046a9
@ -22,7 +22,7 @@ function BufferWriter(options) {
|
|||||||
this.written = 0;
|
this.written = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferWriter.prototype.render = function render() {
|
BufferWriter.prototype.render = function render(keep) {
|
||||||
var data = new Buffer(this.written);
|
var data = new Buffer(this.written);
|
||||||
var off = 0;
|
var off = 0;
|
||||||
var i, item;
|
var i, item;
|
||||||
@ -49,6 +49,9 @@ BufferWriter.prototype.render = function render() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keep !== true)
|
||||||
|
this.destroy();
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user