Since you are assigning null to the MyClassInstance variable, which simply refers to your actual instance located on the heap. You do not touch your actual instance of the class in any way.
In fact, you cannot directly free the memory that your instance of the class occupies; This is what the garbage collector does. It looks if there are any links (I think, pointers, but not) to your instance on the left, and if there are none left, the object will be deleted / collected from memory.
Perhaps this makes it clearer: http://en.csharp-online.net/Value_vs_Reference
source share