Skip to content

Commit 301bbd0

Browse files
Fix memory leak in time/timeEnd (#11)
Fix memory leak in `time`/`timeEnd`
2 parents 0bf3031 + 5f88bf5 commit 301bbd0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function timeEnd(label) {
6363
throw new Error("No such label: " + label)
6464
}
6565

66+
delete times[label]
6667
var duration = now() - time
6768
console.log(label + ": " + duration + "ms")
6869
}

0 commit comments

Comments
 (0)