Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 239

Comment by Peter - Reinstate Monica on Dotnet garbage collector not collection objects when I change reference to null

$
0
0
I am not exactly sure why that is; I would have assumed that the gc collects the objects. A modified version of your test has the same results, see dotnetfiddle.net/5teY0S. People always point out how C# garbage collection is non-deterministic, etc. But I would have assumed that an explicit collect() call causes all non-accessible objects to be reliably collected. Apparently not.

Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>