4 ms·
This claim is false for a lot of modern language runtimes which use tracing garbage collection, like the CLR (C#/VB), JVM (Java/Kotlin/Scala/etc), Go, BEAM (Erl
by kbolino 2y ago
This claim is false for a lot of modern language runtimes which use tracing garbage collection, like the CLR (C#/VB), JVM (Java/Kotlin/Scala/etc), Go, BEAM (Erlang/Elixer), etc.
There are no hard promises about when or even whether GC will reclaim a particular piece of garbage, precisely to enable optimizations and necessary compromises. Application availability is often more important than immediately collecting every possible piece of garbage. The use of tagging, generations, arenas, etc. all allow the GC to use heuristics and apply different collection regimes to different pieces of garbage.
- OutOfHere 2y agoApologies, but I meant it terms of the guarantees that a GC offers. Yes, the GC can delay, but it will never over-eagerly reclaim beyond its advertised guarantee. It will always err on the side of not reclaiming.
- ffgjgf1 2y agoSo exactly the same as saying that you will get your money back at some undefined point in the future whenever the police agency you’re dealing it will find it convenient?
- OutOfHere 2y agoNo, rather that your money (memory) will never be taken away from you (your application) by the police/system (runtime/OS) without an objective rule.