mariadb-corporation / mariadb-connector-nodejs

MariaDB Connector/Node.js is used to connect applications developed on Node.js to MariaDB and MySQL databases. MariaDB Connector/Node.js is LGPL licensed.
GNU Lesser General Public License v2.1
374 stars 91 forks source link

fixed typo #165

Closed mixed closed 3 years ago

mixed commented 3 years ago

The method name seems to be wrong. In this example, a memory leak occurs. :)

rusher commented 3 years ago

This is intentional, connections that comes from pool have an additional method 'release' that permits to give back connection to pool. That's the standard case when using pool to reuse connections.

About the memory leak, i presume you mean the pool still have idle connection, right ? pool.end(); could be called to avoid any leak, but pools normally are never closed, and if added in example, that would create a lot of problems :)

mixed commented 3 years ago

Thank you. I understand what it means. It seems to be correct because it is a pool. :)