Collect Method

GC.Collect Method

 

Forces garbage collection.

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCollect()

Forces an immediate garbage collection of all generations.

System_CAPS_pubmethodSystem_CAPS_staticCollect(Int32)

Forces an immediate garbage collection from generation 0 through a specified generation.

System_CAPS_pubmethodSystem_CAPS_staticCollect(Int32, GCCollectionMode)

Forces a garbage collection from generation 0 through a specified generation, at a time specified by a GCCollectionMode value.

System_CAPS_pubmethodSystem_CAPS_staticCollect(Int32, GCCollectionMode, Boolean)

Forces a garbage collection from generation 0 through a specified generation, at a time specified by a GCCollectionMode value, with a value specifying whether the collection should be blocking.

System_CAPS_pubmethodSystem_CAPS_staticCollect(Int32, GCCollectionMode, Boolean, Boolean)

Forces a garbage collection from generation 0 through a specified generation, at a time specified by a GCCollectionMode value, with values that specify whether the collection should be blocking and compacting.

Return to top
Show:
© 2016 Microsoft