Closed boedy closed 4 years ago
Turns out this is a bug in the node-addon-api for node versions prior to v8.12. See https://github.com/nodejs/node-addon-api/issues/237. For people affected this issue it's recommended you upgrade.
This line was causing the issue: https://github.com/TooTallNate/node-speaker/blob/master/src/binding.c#L122
As for other memory leaks. https://github.com/TooTallNate/node-speaker/pull/144 still needs to be merged as it is causing leaks for all node versions.
I'm experiencing a memory leak on my raspberry PI using
node-speaker
. Running the code copied from @LinusU in this PR https://github.com/TooTallNate/node-speaker/pull/22) will slowly consume all available memory:I'm not able to pinpoint the error, but based on my heap profiles a lot of object are remaining behind, which are not being cleaned by the GC. See a screenshot of that below:
Tested on: Raspberry PI 3B+ NodeJS (v8.11.4)