Destroying a struct object in C#?

前端 未结 8 1634
长情又很酷
长情又很酷 2020-12-17 09:49

I am a bit confused about the fact that in C# only the reference types get garbage collected. That means GC picks only the reference types for memory de-allocation. So what

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-17 10:14

    A value type on the stack is removed from the stack when it goes out of scope.

提交回复
热议问题