4 ms·
You might, for example, insert an entry into a hashtable and forget to remove it. The garbage collector can't go and clean it up because it can't know whether y
by mvanga 15y ago
You might, for example, insert an entry into a hashtable and forget to remove it. The garbage collector can't go and clean it up because it can't know whether you plan to use it or not. This way, over time, the memory usage keeps growing.
- riffraff 15y agoalso, as grandparent guessed, static and thread local variables do not have the same lifecycle of the "normal" objects, I've been bitten more than once by some "clever" optimization caching stuff in those places.