System.Runtime.GCSettings.LatencyMode Property

Gets or sets the current latency mode for garbage collection.

Syntax

[get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)]
[set: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)]
public static GCLatencyMode LatencyMode { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

You can reduce the level of intrusiveness of garbage collection in your application by setting the System.Runtime.GCLatencyMode to GCLatencyMode.LowLatency during critical operations. After such operations are completed, return to a higher latency mode so that more objects can be reclaimed to increase memory.

See Latency Modes for a discussion of how the runtime configuration settings for garbage collection affect the default value of the System.Runtime.GCLatencyMode enumeration.

Requirements

Namespace: System.Runtime
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0