Re:Three kinds of memory leaks
by tigershark on Tuesday May 01, 2018 @02:29AM
(#16964953)
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.
[ Parent
| on HN ]
There are no comments on this comment yet.