coopernurse / node-pool

Generic resource pooling for node.js
2.37k stars 258 forks source link

What does happen if I don't release the resource and close the node? #292

Closed blue-int closed 2 years ago

blue-int commented 2 years ago

Is it safe to do this regarding memory leak, etc?

sandfox commented 2 years ago

Once you close the node process anything that lives inside the node process will be cleaned up by node itself and/or the operating system (if this doesn't happen, then there is a bug with nodejs and/or the operating system . This is true for anything that runs inside the node process, not just generic-pool.

The behaviour of anything you are connecting to from the node process (such as database servers, 3rd party service, external process) is outside the control of node / generic-pool and will be determined by the configuration of whatever server/service/process you are connecting to.

blue-int commented 2 years ago

@sandfox What an answer! Thanks!