Closed
Description
This simple little loop chews through all the memory on my Debian box. I'm nulling the Image instance every time through.
Running with node --trace_gc tst6.js shows that garbage collection is happening but this script will use 2GB of memory in short order then get killed. In real life the interval would be 10s
...
setInterval(timestampImage, 100);
function timestampImage() {
var cameraImage = new Image;
cameraImage.onload = onLoad;
cameraImage.onerror = function(err) {
console.log(err);
};
cameraImage.src = blackJpeg;
cameraImage = null;
}
function onLoad() {
...
Put the image in a canvas, add a text timestamp, save
...
}
Metadata
Metadata
Assignees
Labels
No labels