From ead35cedbe688d6f92c1ed7e33638d3cb94777f1 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 27 Oct 2014 16:19:46 -0400 Subject: [PATCH] code review --- src/js/pagestats.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/pagestats.js b/src/js/pagestats.js index 73916c5..bfc9f5e 100644 --- a/src/js/pagestats.js +++ b/src/js/pagestats.js @@ -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-- ) {