Skip to content

Commit

Permalink
Merge pull request #1414 from napi-rs/delete-reference
Browse files Browse the repository at this point in the history
Delete reference
  • Loading branch information
Brooooooklyn committed Dec 29, 2022
2 parents ce4c284 + 877d631 commit 75af3d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion crates/napi/Cargo.toml
Expand Up @@ -50,7 +50,7 @@ tokio_time = ["tokio/time"]

[dependencies]
ctor = "0.1"
once_cell = "1"
once_cell = "1.16"
thread_local = "1"
bitflags = "1"

Expand Down
6 changes: 0 additions & 6 deletions crates/napi/src/bindgen_runtime/module_register.rs
Expand Up @@ -598,12 +598,6 @@ extern "C" fn custom_gc(
_context: *mut std::ffi::c_void,
data: *mut std::ffi::c_void,
) {
let mut ref_count = 0;
check_status_or_throw!(
env,
unsafe { sys::napi_reference_unref(env, data as sys::napi_ref, &mut ref_count) },
"Failed to unref Buffer reference in Custom GC"
);
check_status_or_throw!(
env,
unsafe { sys::napi_delete_reference(env, data as sys::napi_ref) },
Expand Down

0 comments on commit 75af3d4

Please sign in to comment.