Open Name-less opened 7 years ago
After some researches, a workaround is possible https://github.com/Automattic/node-canvas/issues/785
add img.src = null; on your importImage function on the onload callback
I will try it out ...
Finally adding
process.nextTick(function() { img.onload = null; });
Fix the leak, I fork the project here : https://github.com/Name-less/filterous-2/releases/tag/2.0.2
Thanks for this library that work very well.
But when I apply a filter on server side with nodejs over 100 images one after another, the memory of the server increase to 300 Mo, and when it's over, the memory is not released and the server still take 300 Mo of memory until we restart it.
It is possible that the issue came from the node-canvas library used, see : https://github.com/Automattic/node-canvas/pull/1003
Are you compatible with node-canvas 2.0-alpha ?