In theory, some type of escape analysis could be performed by the CLR. If that led to the conclusion that the object was only accessible from the local context, it could then go ahead and allocate the object on the stack. At this point, however, that is not done, and a class will always be allocated in the long-term storage area (aka "the heap".)
Also, note that the variable bar
is allocated on the stack (or possibly enregistered). It contains a reference to the newly created Bar
object (on the heap), and will disappear when the method exits.