Created
June 4, 2015 15:49
-
-
Save anonymous/ea19c1dcbd576dba4c63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Program | |
{ | |
public static void Main() | |
{ | |
object o = new object(); | |
WeakReference r = new WeakReference(o); | |
GC.Collect(); | |
Console.WriteLine("Still alive? {0}", r.IsAlive ? "yes" : "no"); | |
Console.ReadLine(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment