-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
node-api: Memory leak fix for RefBase::Delete(RefBase* reference) #44339
base: main
Are you sure you want to change the base?
Conversation
This is to fix the memory leak. calling finalizer and not setting _finalize_ran to true will cause a memory leak.
Review requested:
|
Would you mind sharing a re-production with the memory leak? |
Usually, it takes a lot of time to create a sample app that follows a certain sequence to reproduce the memory leak. This leak is always reproducible in my app but I am not supposed to share the code base. Please check the usage of memory leak got fixed in our app after setting |
I am still skeptical about if this change is the actual solution that settled the memory leak you mentioned. The FWIW, we are working on simplifying the finalization procedures at #44141. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR needs to wait for the question raised in #44339 (comment) to be resolved before proceeding.
@legendecas do you think your changes related to reference have addressed the issue and that this PR is no longer needed/applicable? |
Right, telling from the change sites I believe they are relevant. @nagendra5 would you mind verifying if the leak is still observable in the latest build of Node.js v18.14.0 or later versions? Thank you. |
@nagendra5 are you able to validate the issue still occurs with recent versions? |
Memory leak fix: Added missing
_finalize_ran
.