HandleCollector Class
TOC
Collapse the table of content
Expand the table of content

HandleCollector Class

 

Tracks outstanding handles and forces a garbage collection when the specified threshold is reached.

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

System.Object
  System.Runtime.InteropServices.HandleCollector

public sealed class HandleCollector

NameDescription
System_CAPS_pubmethodHandleCollector(String, Int32)

Initializes a new instance of the HandleCollector class using a name and a threshold at which to begin handle collection.

System_CAPS_pubmethodHandleCollector(String, Int32, Int32)

Initializes a new instance of the HandleCollector class using a name, a threshold at which to begin handle collection, and a threshold at which handle collection must occur.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of handles collected.

System_CAPS_pubpropertyInitialThreshold

Gets a value that specifies the point at which collections should begin.

System_CAPS_pubpropertyMaximumThreshold

Gets a value that specifies the point at which collections must occur.

System_CAPS_pubpropertyName

Gets the name of a HandleCollector object.

NameDescription
System_CAPS_pubmethodAdd()

Increments the current handle count.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodRemove()

Decrements the current handle count.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The HandleCollector class keeps track of a limited number of handles to unmanaged resources. Typically, unmanaged resources include handles to HDCs, HWnds, and so on.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft