fuwaneko / node-protobuf

Google Protocol Buffers wrapper for Node.js [UNMAINTAINED]
181 stars 42 forks source link

Memory leak when creating pb_wrappers #86

Open InfinitiesLoop opened 7 years ago

InfinitiesLoop commented 7 years ago

We are using node-protobuf in a system that handles generic messages. We load the schemas for the protobuf messages at runtime, and periodically reload them in case they have changed (users of the system can evolve their messages).

We have noticed a slow memory leak with the services using node-protobuf. There may be multiple causes, but I think I've identified this being at least one of them.

I have a PR incoming that demonstrates. I have only reproduced the problem, not looked into the cause yet. Hoping it seems obvious to you?

InfinitiesLoop commented 7 years ago

PR with a reproduction script: https://github.com/fuwaneko/node-protobuf/pull/87

fuwaneko commented 7 years ago

Thanks for reporting, there's been a memory leak in native module. Should be fixed in 1.4.2.