How to force garbage collector to run? Ask Question

How to force garbage collector to run? Ask Question

Interviewer asked me about this today ...is there an answer ?

ベストアンサー1

System.GC.Collect() forces garbage collector to run. This is not recommended but can be used if situations arise.

おすすめ記事