Under what circumstances, we need to call GC.Collect twice

前端 未结 4 2152
离开以前
离开以前 2020-12-01 11:33

We have a WPF application, based on Unity with MMVVVM pattern. In application life cycle there can be several project life cycles, after each project life cycle we do a manu

4条回答
  •  眼角桃花
    2020-12-01 12:14

    @Nitin, I am not sure whether my suggestion would help you or not, but as a rule of thumb we should avoid explicitly calling GC.Collect(). because it will likely to cause performance problem. Instead try to follow the proper disposal pattern.

提交回复
热议问题