Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
src: use std::list for at_exit_functions#12255
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
danbev commented Apr 6, 2017
src/node.cc Outdated
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.
Use AtExitCallback not a pointer-to-AtExitCallback. It's leaking memory now in RunAtExit().
(Tiny nit: it should really be called at_exit_functions, it's not a class member.)
src/node.cc Outdated
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.
Style: at_exit
src/node.cc Outdated
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.
Oh, maybe call this at_exit for consistency.
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.
Ah good point, will change that. Thanks!
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.
Is using an anonymous object something considered ok to do?
at_exit_functions.push_back(AtExitCallback{cb, arg});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.
Yes, that's fine.
danbev commented Apr 6, 2017
This change was suggested by bnoordhuis in the following comment: nodejs#9163 (comment) Not including any tests as this is covered by test/addons/at-exit.
danbev commented Apr 9, 2017
This change was suggested by bnoordhuis in the following comment: nodejs#9163 (comment) Not including any tests as this is covered by test/addons/at-exit. PR-URL: nodejs#12255 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
danbev commented Apr 10, 2017
Landed in fe016c6 |
This change was suggested by bnoordhuis in the following comment: nodejs#9163 (comment) Not including any tests as this is covered by test/addons/at-exit. PR-URL: nodejs#12255 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins commented Apr 18, 2017
Should this be cherry-picked to v6.x? It lands cleanly fwiw |
danbev commented Apr 19, 2017
@MylesBorins Not sure as it is a minor improvement, but if it lands cleanly I see no harm in that. Let me know if you'd like me to create a PR against v6.x-staging. Thanks |
This change was suggested by bnoordhuis in the following comment: #9163 (comment) Not including any tests as this is covered by test/addons/at-exit. PR-URL: #12255 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
This change was suggested by bnoordhuis in the following comment: nodejs/node#9163 (comment) Not including any tests as this is covered by test/addons/at-exit. PR-URL: nodejs/node#12255 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
This change was suggested by bnoordhuis in the following comment:
#9163 (comment)
Not including any tests as this is covered by test/addons/at-exit.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
src