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

In C# it cannot happen. The garbage collector phase is compacting. In the past you could have had this problem in the large object heap (that stores objects larger than 85k) because the GC there is not compacting. From .Net 4.5 or something similar they added an option to trigger a compacting GC in the large object heap, so this problem is solved. The article is missing maybe the biggest leak in GC languages that is when resources are not properly closed. A classic example is not unsubscribing an event in .Net that may cause massive leaks if you have a main window that through its ViewModel will listen to events of any child viewmodel but it doesn’t unsubscribe the event when the child window is closed. As a result the more child window you open and close the more memory is leaking.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: