Title: repl: keep reference count for `process.on('newListener')` by addaleax · Pull Request #61895 · nodejs/node · GitHub
Open Graph Title: repl: keep reference count for `process.on('newListener')` by addaleax · Pull Request #61895 · nodejs/node
X Title: repl: keep reference count for `process.on('newListener')` by addaleax · Pull Request #61895 · nodejs/node
Description: When investigating a memory leak in one of our applications, we discovered that this listener holds on to a REPLServer instance and all heap objects transitively kept alive by it by capturing as part of its closure. It's cleaner to declare the listener outside of the REPLServer class and to actually clean it up properly when it is no longer required or meaningful, which is easily achieved through keeping a reference count.
Open Graph Description: When investigating a memory leak in one of our applications, we discovered that this listener holds on to a REPLServer instance and all heap objects transitively kept alive by it by capturing as pa...
X Description: When investigating a memory leak in one of our applications, we discovered that this listener holds on to a REPLServer instance and all heap objects transitively kept alive by it by capturing as pa...
Opengraph URL: https://github.com/nodejs/node/pull/61895
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:bf5f3362-09b9-8c45-b15e-1e117525e446 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A8F6:1F6B81:570A6:7448D:6A4C116D |
| html-safe-nonce | 24fec2229efc71910cc39c6ea314c86f8e7a289cf56366ff753f42f003eaa432 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEY2OjFGNkI4MTo1NzBBNjo3NDQ4RDo2QTRDMTE2RCIsInZpc2l0b3JfaWQiOiI0MTQ1MjY5MTY3NjE4Nzg5NzQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a34228265e57ec5f3300afa77c6b10392eae317ae0f6db4c9740bdd924ccb2a6 |
| hovercard-subject-tag | pull_request:3305705646 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/61895/files |
| twitter:image | https://avatars.githubusercontent.com/u/899444?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/899444?s=400&v=4 |
| og:image:alt | When investigating a memory leak in one of our applications, we discovered that this listener holds on to a REPLServer instance and all heap objects transitively kept alive by it by capturing as pa... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0ccfc9e5281bfe12e38a4d632dc422843e4d5b6757917f7efda2f6567d72fea9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 18812876666a23a0912556e224383baa4c84cf8e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width