Is it possible to force garbage collector to run?- Yes, we can force garbage collector to run using System.GC.Collect(). - It can be used to avoid calling any of the collect methods and allow the garbage collector to run independently. - It is better at determining the best time to perform a collection.
|