Skip to content

Commit

Permalink
fix: memory leak in Image/loadImage (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn authored Oct 14, 2024
1 parent f791f86 commit 527c0da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ base64-simd = "0.8"
cssparser = "0.29"
infer = "0.16"
libavif = { version = "0.14", default-features = false, features = ["codec-aom"] }
napi = { version = "3.0.0-alpha.14", default-features = false, features = ["napi3", "serde-json"] }
napi = { version = "3.0.0-alpha.15", default-features = false, features = ["napi3", "serde-json"] }
napi-derive = { version = "3.0.0-alpha.14", default-features = false }
nom = "7"
num_cpus = "1"
Expand Down
4 changes: 4 additions & 0 deletions src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,4 +470,8 @@ impl Task for BitmapDecoder {
}
Ok(())
}

fn finally(mut self, env: Env) -> Result<()> {
self.this_ref.unref(&env)
}
}

0 comments on commit 527c0da

Please sign in to comment.