Don't delete timer object on clearTimeout.
authorRyan Dahl <ry@tinyclouds.org>
Mon, 28 Sep 2009 14:13:33 +0000 (16:13 +0200)
committerRyan Dahl <ry@tinyclouds.org>
Mon, 28 Sep 2009 16:48:18 +0000 (18:48 +0200)
I've heard delete is inefficient in v8. Better to let the garbage collector
take care of it naturally.

src/node.js

index 9247a02..917a15d 100644 (file)
@@ -46,7 +46,6 @@ function setInterval (callback, repeat) {
 
 function clearTimeout (timer) {
   timer.stop();
-  delete timer;
 }
 
 clearInterval = clearTimeout;