Export (0) Print
Expand All

GCLatencyMode Enumeration

Adjusts the time that the garbage collector intrudes in your application.

Namespace:  System.Runtime
Assemblies:   System.Runtime (in System.Runtime.dll)
  mscorlib (in mscorlib.dll)

'Declaration
Public Enumeration GCLatencyMode

Member nameDescription
Supported by Portable Class LibrarySupported in .NET for Windows Store appsBatchDisables garbage collection concurrency and reclaims objects in a batch call. This is the most intrusive mode.

This mode is designed for maximum throughput at the expense of responsiveness. 

This mode overrides the <gcConcurrent> runtime configuration setting. If <gcConcurrent> is enabled, switching to Batch mode prevents any further concurrent collections.

Supported by Portable Class LibrarySupported in .NET for Windows Store appsInteractiveEnables 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 Batch. It balances responsiveness with throughput.

This mode is equivalent to garbage collection on a workstation that is concurrent.

Supported by Portable Class LibrarySupported in .NET for Windows Store appsLowLatencyEnables 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

This mode is not available for the server garbage collector.

Supported in .NET for Windows Store appsSustainedLowLatencyEnables 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 one of the enumeration values.

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

.NET Framework

Supported in: 4.6, 4, 3.5 SP1, 3.0 SP1, 2.0 SP1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft