Understanding c# memory model