brianc / node-libpq

Simple, low level native bindings to PostgreSQL's libpq from node.js
112 stars 42 forks source link

Reuse buffer allocated by PQgetCopyData #44

Closed promag closed 8 years ago

promag commented 8 years ago

PQgetCopyData allocate and copy the data for the caller to use and free. It is therefore not necessary to duplicate that work again.

The FreeBuffer callback is called when the garbage collector runs.

brianc commented 8 years ago

@promag really appreciate this!! Thank you!! Pushing a new patch version now. 😄