-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
remove extra closure #3446
remove extra closure #3446
Conversation
This commit removes an extra closure which captures circular memory references.
Care to elaborate why this would fix the situation ? This seems equivalent. |
The error handler was capturing the things that were reported as leaking in outmoded/discuss#433. By removing the arrow function, the closure goes away, and the memory associated with those things can be released. |
JS is so stupid sometimes... Good catch ! |
So this was an actual leak? |
It only affects you if you are creating and removing many servers. If you are creating a new server per test then those were never released from memory. There is no issue in production. |
@sjuchno makes sense thanks! |
Can someone explain this in more detail? Is it because |
I made a mistake. I made the change to The problem is that there are 193 |
It looks like lab is adding a bunch of @geek what do you think? |
@cjihrig sounds like a good change to me... we didn't bother with the removal likely because the process is so short lived with lab |
Should this be revered in hapi? |
There's no harm in writing it like this. It still saves on an unnecessary closure. |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
Closes outmoded/discuss#433