peterkhayes/rolling-rate-limiter

Memory leak

0x1mason opened this issue · 1 comments

The timeout handle is never removed from the timeouts hash. While clearTimeout ensures the timer is cleared and the callback is not invoked, timeouts retains a reference to the handle. The hash size grows indefinitely. Also, Node appears to add a domain property to timeouts, so domain context is also retained.

Good catch! I've fixed this and published.