Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: memory leak in Image #934

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Conversation

Brooooooklyn
Copy link
Owner

@Brooooooklyn Brooooooklyn commented Nov 7, 2024

There 2 leak points in the Image class.

  1. The Env::create_reference was wrong in NAPI-RS, related pr: chore(napi): deprecate Env::create_reference napi-rs/napi-rs#2347, change to the Ref::new can resolve it.
  2. The PromiseRaw::catch callback was leaked, it cause the whole Image objects not be GCed, it was fixed in fix(napi): memory leak in PromiseRaw callbacks napi-rs/napi-rs#2348

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Brooooooklyn and the rest of your teammates on Graphite Graphite

Copy link
Owner Author

Brooooooklyn commented Nov 7, 2024

Merge activity

  • Nov 7, 1:27 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Nov 7, 1:27 AM EST: A user merged this pull request with Graphite.

@Brooooooklyn Brooooooklyn merged commit cfc4da5 into main Nov 7, 2024
29 checks passed
@Brooooooklyn Brooooooklyn deleted the 11-07-fix_memory_leak_in_image_class branch November 7, 2024 06:27
@fengmk2
Copy link

fengmk2 commented Nov 7, 2024

感谢修复,公司内部通过压测验证修复有效!☆( ̄▽ ̄)/$:*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants