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

Dotnet does both mark and sweep as well as compaction, depends on what type of GC happens.


In this case, we're discussing a case where mark-and-sweep is used to collect cyclic references, and it's implied that there are no generations. (Because otherwise, purely relying on reference counting means that cyclic references end up leaking unless things like weak references are used.)

IE, the critical difference is that reference counting frees memory immediately; albeit at a higher CPU cost and needing to still perform a mark-and-sweep to clear out cyclic references.




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

Search: