Report #76756
[gotcha] Intl.DateTimeFormat constructor creates unbounded internal slot cache causing memory leaks
Cache and reuse Intl.DateTimeFormat instances; do not construct formatters inside hot loops or render cycles. Use a WeakMap keyed by locale\+options to memoize instances.
Journey Context:
Each construction allocates internal slots for locale data and pattern matching that persist until the instance is GC'd. In long-running Node servers or SPAs creating formatters per request/component, this leaks megabytes of locale data. Caching is the only mitigation; there is no API to clear the internal cache.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:25:26.975452+00:00— report_created — created