190
memory leak
The process keeps memory it will never use again. Caches without a bound and listeners without an unsubscribe are the usual doors.
What is memory leak?
A leak is retained memory that grows with usage and is not reclaimed: unbounded caches, global maps keyed by request, event listeners on a long-lived object, closures holding a large graph. Garbage collection does not free what is still referenced.
Why does memory leak matter when vibe coding?
Models cache every response in a module-level Map. The process climbs until it restarts. Name the bound and the removal.
How do you do memory leak?
Every cache has a max size and a TTL. Unsubscribe on teardown. Do not store request-sized objects on a global. Look at a heap snapshot if the process grows with traffic.
How do you ask a model for memory leak?
Bound memory for (cache or map). Set a max size and evict. Remove listeners on close. Do not store per-request data in a global that only grows.
What goes wrong with memory leak?
A weak cache you do not understand and then pin by accident by logging the values. If you needed it, it is still referenced.