1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-26 10:01:08 +12:00

code review

This commit is contained in:
gorhill 2014-10-27 16:19:46 -04:00
parent 5131a5d806
commit ead35cedbe

View file

@ -162,6 +162,7 @@ var LogEntry = function() {
var logEntryJunkyard = [];
LogEntry.prototype.dispose = function() {
this.url = this.type = '';
// Let's not grab and hold onto too much memory..
if ( logEntryJunkyard.length < 200 ) {
logEntryJunkyard.push(this);
@ -226,8 +227,8 @@ PageRequestStats.prototype.dispose = function() {
continue;
}
stringPacker.forget(reqKey.slice(3));
delete requests[reqKey];
}
this.requests = {};
var i = this.ringBuffer.length;
var logEntry;
while ( i-- ) {