GC.Collect()

前端 未结 7 2087
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 19:21

Ok, I\'ve read a couple of topics about it, but here it goes. Let\'s imagine I have an application where basically every now and then I will click on a button, a lot of thin

7条回答
  •  半阙折子戏
    2020-11-27 19:55

    To know when to call GC.Collect(), you'd need to know details of the specific collector involved with the runtime along with detailed information about a weak point that you can solve with the collection.

    In other words, if you really know when you need to call GC.Collect(), and it's not something you'd done poorly in other code, then you probably work for CLR Internals and can just fix the problem.

提交回复
热议问题