I can't find a clear answer for this. If I instantiate a reference type inside a method but do not store it on any class variable, how long does this reference live on the heap? Is it marked as garbage on the method return and eventually get cleared by the Garbage collector?
void DoSomeStuff()
{
var myRefInstance = new Object();
}