LatencyMode Property
Collapse the table of content
Expand the table of content

GCSettings.LatencyMode Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the current latency mode for garbage collection.

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

'Declaration
Public Shared Property LatencyMode As GCLatencyMode

Property Value

Type: System.Runtime.GCLatencyMode
One of the enumeration values that specifies the latency mode.

ExceptionCondition
ArgumentOutOfRangeException

GCLatencyMode is set to an invalid value.

You can reduce the level of intrusiveness of garbage collection in your application by setting the GCLatencyMode to 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 [96278bb7-6eab-4612-8594-ceebfc887d81] for a discussion of how the runtime configuration settings for garbage collection affect the default value of the GCLatencyMode enumeration.

Windows Phone OS

Supported in: 8.1, 8.0

  • SecurityCriticalAttribute 

    requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Show:
© 2017 Microsoft