HandleCollector Class
.NET Framework 4.5
Tracks outstanding handles and forces a garbage collection when the specified threshold is reached.
Namespace: System.Runtime.InteropServices
Assembly: System (in System.dll)
The HandleCollector type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | HandleCollector(String, Int32) | Initializes a new instance of the HandleCollector class using a name and a threshold at which to begin handle collection. |
![]() ![]() | HandleCollector(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. |
| Name | Description | |
|---|---|---|
![]() ![]() | Count | Gets the number of handles collected. |
![]() ![]() | InitialThreshold | Gets a value that specifies the point at which collections should begin. |
![]() ![]() | MaximumThreshold | Gets a value that specifies the point at which collections must occur. |
![]() ![]() | Name | Gets the name of a HandleCollector object. |
| Name | Description | |
|---|---|---|
![]() ![]() | Add | Increments the current handle count. |
![]() ![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | Remove | Decrements the current handle count. |
![]() ![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

