IsServerGC Property
Collapse the table of content
Expand the table of content

GCSettings.IsServerGC Property

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

Gets a value that indicates whether server garbage collection is enabled.

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

public static bool IsServerGC { get; }

Property Value

Type: System.Boolean
true if server garbage collection is enabled; otherwise, false.

If server garbage collection is not enabled, workstation garbage collection is in effect (with or without concurrent collection). Server garbage collection is available only on multiprocessor computers.

An unmanaged host can request server garbage collection, and the host request overrides configuration file settings. If the host does not specify the type of garbage collection, you can use a configuration file setting to specify server garbage collection. This setting is valid only in the application configuration file, not in the machine configuration file. The following example shows the contents of a sample application configuration file that enables server garbage collection.

<configuration>
  <runtime>
    <gcServer enabled="true" />
  </runtime>
</configuration>

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft