Suppressing C# garbage collection

后端 未结 6 1078
挽巷
挽巷 2021-02-08 09:26

My application allocates a large amount of memory (millions of small objects totaling several gigabytes) and holds onto it for a long time.

  1. Is .NET wasting time ch
6条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-08 09:51

    Unless you can confirm that the garbage collector is actively slowing the performance of your application, you should not take steps to cripple the functionality of your runtime environment.

    Judging from your question, you have not confirmed that the GC is a problem. I severely doubt that it is.

    Optimize only what needs to be optimized.

提交回复
热议问题