Allocating more and more memory, but forgetting to
- timely free it
- free it at all
Mainly a problem of long forgotten days without
GarbageCollection, but beware if you roll your own memory allocation - it could happen faster than you think. Each global
HashMap in a singleton can become one, or your
SessionStore may grow without limits.
Also happens in garbage collected environments when
- references to an object are unexpectedly held
Even if your environment supports garbage-collection, it is always important to remember that GC environments deallocate lazily... so while you can't leak memory, objects that map to other, much more precious resources (like database connections) can pile up quickly.
See also
TestForMemoryLeak,
MemoryLeakInCpp,
AutoCad
CategoryBug