3 ms·
Java's GC does it. When a reference becomes unreachable, it will automatically free the resource. That's not the issue. The issue is that GCs are not predictabl
by tjansen 7y ago
Java's GC does it. When a reference becomes unreachable, it will automatically free the resource. That's not the issue. The issue is that GCs are not predictable. All current implementations either have issues with circular references, or they run infrequently and may even need several runs to clean up complex structures.
So it may take a while until an unused resource becomes available again, and you don't know when.