nodejs / nan

Native Abstractions for Node.js
MIT License
3.28k stars 504 forks source link

`Nan::NewBuffer` should accept an external deleter #925

Closed mmomtchev closed 2 years ago

mmomtchev commented 2 years ago

There are 2 cases where this is needed:

There already is a corresponding node::Buffer::New method that implements this

mmomtchev commented 2 years ago

In fact, this already exists, Nan::NewBuffer has an optional node::Buffer::FreeCallback argument