Files
node/lib
Anna Henningsen 8450c1cf33 repl: keep reference count for process.on('newListener')
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.

PR-URL: https://github.com/nodejs/node/pull/61895
Backport-PR-URL: https://github.com/nodejs/node/pull/63194
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-07-19 17:31:15 -05:00
..
…
…
…
…
…
…
2025-08-26 11:22:39 +02:00
…
…
2025-10-18 20:35:56 +02:00
…
2026-02-24 00:37:08 +01:00
2025-09-20 06:16:51 +00:00
…
…
…
2025-10-07 17:29:36 +02:00
2026-02-24 08:38:58 +01:00
…
…
…
2025-09-20 03:32:52 +00:00