What does happen if I don't release the resource and close the node?
Is it safe to do this regarding memory leak, etc?
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.
@sandfox What an answer! Thanks!