HandleCollector Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
-
HandleCollector
Remarks
The HandleCollector class keeps track of a limited number of handles to unmanaged resources. Typically, unmanaged resources include handles to HDC
s, HWnd
s, and so on.
Constructors
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. |
Properties
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. |
Methods
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 the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
Remove() |
Decrements the current handle count. |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om