HandleCollector HandleCollector HandleCollector HandleCollector Class

Definition

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

public ref class HandleCollector sealed
public sealed class HandleCollector
type HandleCollector = class
Public NotInheritable Class HandleCollector
Inheritance
HandleCollectorHandleCollectorHandleCollectorHandleCollector

Remarks

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.

Constructors

HandleCollector(String, Int32) HandleCollector(String, Int32) HandleCollector(String, Int32) 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) HandleCollector(String, Int32, Int32) HandleCollector(String, Int32, Int32) 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.

Properties

Count Count Count Count

Gets the number of handles collected.

InitialThreshold InitialThreshold InitialThreshold InitialThreshold

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

MaximumThreshold MaximumThreshold MaximumThreshold MaximumThreshold

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

Name Name Name Name

Gets the name of a HandleCollector object.

Methods

Add() Add() Add() Add()

Increments the current handle count.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove() Remove() Remove() Remove()

Decrements the current handle count.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to