Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Apologies, 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.


So 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?


No, rather that your money (memory) will never be taken away from you (your application) by the police/system (runtime/OS) without an objective rule.


So police is the VM/programming language and you’re the program? Person writing the program? Or is it the other way around?


It seems like the analogy just didn’t work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: