Changed stats.js to use delete

Changed stats.js to use delete instead of setting the values to
undefined in order to save some memory.
This commit is contained in:
Patrick McCoy 2012-11-26 12:56:29 -07:00
Родитель 24390eef6e
Коммит c03f33910e
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -57,7 +57,7 @@ function flushMetrics() {
conf.deleteCounters = conf.deleteCounters || false; conf.deleteCounters = conf.deleteCounters || false;
for (key in metrics.counters) { for (key in metrics.counters) {
if (conf.deleteCounters) { if (conf.deleteCounters) {
metrics.counters[key] = undefined; delete(metrics.counters[key]);
} else { } else {
metrics.counters[key] = 0; metrics.counters[key] = 0;
} }