Original Post
I am running through some C# tutorials and wanted to know a little about how C# handles memory. StringBuilder first = new StringBuilder(); StringBuilder second = first; first.Append ("hello"); first = null; Console.WriteLine (second); In the above code snipit I know that first and second are just handles to a StringBuilder object. My question is, what happens when you null out the variables first and second? If you null out first, second is still live so hello will still be printed to the screen. But if you null them both out in my mind all that has happened is a loss of handles with memory still floating around on the heap. Is this a mem leak?