.NET Memory Consumption Question-Collection of common programming errors

The compiler will generate IL that’s equivalent to version 2 of your code, a virtual stack location is needed to store the object reference. The JIT optimizer will generate machine code that’s equivalent to version 1 of your code, the reference is stored in a CPU register.

In other words, it doesn’t matter. You get the exact same machine code at runtime.