What is root reference ?
Posted
by DotNetGuy
on Stack Overflow
See other posts from Stack Overflow
or by DotNetGuy
Published on 2010-05-01T08:31:43Z
Indexed on
2010/05/01
10:47 UTC
Read the original article
Hit count: 193
.NET
|garbage-collection
class GCTest {
static Object r1;
static void Main() {
r1 = new Object();
Object r2 = new Object();
Object r3 = new Object();
System.GC.Collect(); // what can be reclaimed here ?
r1 = null;
r3.ToString();
System.GC.Collect(); // what can be reclaimed here ?
}
}
// code from - DonBox's Essential .Net
© Stack Overflow or respective owner