Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework
  Element
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework General Reference
<gcServer> Element

Specifies whether the common language runtime runs server garbage collection.

<configuration> Element
  <runtime> Element
    <gcServer> Element
<gcServer  
   enabled="true|false"/>

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

enabled

Required attribute.

Specifies whether the runtime runs server garbage collection.

Enabled Attribute

Value

Description

false

Does not run server garbage collection. This is the default.

true

Runs server garbage collection.

Child Elements

None.

Parent Elements

Element

Description

configuration

The root element in every configuration file used by the common language runtime and .NET Framework applications.

runtime

Contains information about assembly binding and garbage collection.

There are only two garbage collection options, workstation or server. For single-processor computers, the default workstation garbage collection should be the fastest option. Either workstation or server can be used for two-processor computers. Server garbage collection should be the fastest option for more than two processors. Use the GCSettings..::.IsServerGC property to determine if server garbage collection is enabled.

This element can be used only in the application configuration file.

The following example shows how to enable server garbage collection.

<configuration>
   <runtime>
      <gcServer enabled="true"/>
   </runtime>
</configuration>
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content      
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker