Created
September 2, 2011 17:55
-
-
Save user24/1189300 to your computer and use it in GitHub Desktop.
Node memory leak?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var foo = []; | |
setInterval(function() { | |
foo.push(Math.random()); | |
if(foo.length > 200) { | |
foo = foo.slice(-200); | |
} | |
console.log(foo.length); | |
}, 10); |
This is in node v0.4.9
Seems to be fixed in v0.4.11, am testing
I don't know what to believe any more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ node leak.js > leak.log &
$ top
and watch the memory usage climb. I don't fully understand why, and I don't know if this is a purely node issue...