|
|
|
|
|
by cheald
4090 days ago
|
|
Memory leaks are technically when you allocate memory, then lose the reference to it without freeing it, thus leaving the memory permanently allocated without a way to free it. Outside of a serious VM bug, you won't leak memory in a GC'd language; instead, you can leak references (leaving objects alive and uncollectable even after you've finished using them, because you've left a reference to the object laying around somewhere without intending to). The memory is still reclaimable, if you can eliminate the references keeping the object from being GC'd. This really is just pedantry though, because the net effect is "the memory usage chart keeps going up and to the right" in both cases. "Memory leak" is a fine enough term for what's happening in this case. |
|