fix(napi): should also delete the reference while dropping the Buffer
This commit is contained in:
parent
4279291f4b
commit
47de6301ee
6 changed files with 53 additions and 36 deletions
examples/napi/src
|
@ -68,8 +68,6 @@ impl Task for AsyncBuffer {
|
|||
}
|
||||
|
||||
#[napi]
|
||||
fn async_reduce_buffer(mut buf: Buffer, env: Env) -> Result<AsyncTask<AsyncBuffer>> {
|
||||
Ok(AsyncTask::new(AsyncBuffer {
|
||||
buf: buf.clone(&env)?,
|
||||
}))
|
||||
fn async_reduce_buffer(buf: Buffer) -> Result<AsyncTask<AsyncBuffer>> {
|
||||
Ok(AsyncTask::new(AsyncBuffer { buf: buf.clone() }))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue