Use the GC.Collect(int, GCCollectionMode) method overload to specify the GCCollectionMode value.
Member Name | Description |
---|---|
Default |
![]() The default setting for this enumeration, which is currently GCCollectionMode.Forced. |
Forced |
![]() Forces the garbage collection to occur immediately. |
Optimized |
![]() Allows the garbage collector to determine whether the current time is optimal to reclaim objects. |