C# - Garbage Collection

前端 未结 9 901
闹比i
闹比i 2021-01-31 11:15

Ok so I understand about the stack and the heap (values live on the Stack, references on the Heap).

When I declare a new instance of a Class, this lives on the heap, wit

9条回答
  •  没有蜡笔的小新
    2021-01-31 11:50

    If you are interested in performance of some areas in your code when writing C#, you can write unsafe code. You will have a plus of performance, and also, in your fixed block, the garbage collector most likely will not occur.

提交回复
热议问题