Adjusts the time that the garbage collector intrudes in your application.
Assembly: mscorlib (in mscorlib.dll)
Disables garbage collection concurrency and reclaims objects in a batch call. This is the most intrusive mode.
Enables garbage collection concurrency and reclaims objects while the application is running. This is the default mode for garbage collection on a workstation and is less intrusive than. It balances responsiveness with throughput.
Enables garbage collection that is more conservative in reclaiming objects. Full collections occur only if the system is under memory pressure, whereas generation 0 and generation 1 collections might occur more frequently
Indicates that garbage collection is suspended while the app is executing a critical path.
Enables garbage collection that tries to minimize latency over an extended period. The collector tries to perform only generation 0, generation 1, and concurrent generation 2 collections. Full blocking collections may still occur if the system is under memory pressure.
You can adjust the intrusiveness of garbage collection in your application by setting the LatencyMode property to any enumeration value except . You can also determine the garbage collector's current latency mode by retrieving the GCSettings.LatencyMode property value.
See Latency Modes for a discussion of how the runtime configuration settings for garbage collection affect the default value for this enumeration.
Available since 8
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Available since 8.1