Search found 1 match

by mnn
Tue Aug 07, 2012 8:20 pm
Forum: Using .NET Memory Profiler
Topic: Local variable doesn't get GCed
Replies: 1
Views: 8188

Local variable doesn't get GCed

I have something like this: using (var obj = new MyObject()) // obj holds reference to a stream, thus is disposable { var something = GetSomething(obj); // something holds reference to obj // working... } If I do snapshot in .NET Memory Profiler right after obj is disposed by using, something is sti...