HandleCollector 建構函式

定義

多載

HandleCollector(String, Int32)

使用名稱以及要開始進行控制代碼回收的臨界值,初始化 HandleCollector 類別的新執行個體。

HandleCollector(String, Int32, Int32)

使用名稱、要開始進行控制代碼回收的臨界值以及必須執行控制代碼回收的臨界值,初始化 HandleCollector 類別的新執行個體。

HandleCollector(String, Int32)

來源:
HandleCollector.cs
來源:
HandleCollector.cs
來源:
HandleCollector.cs

使用名稱以及要開始進行控制代碼回收的臨界值,初始化 HandleCollector 類別的新執行個體。

public:
 HandleCollector(System::String ^ name, int initialThreshold);
public HandleCollector (string name, int initialThreshold);
public HandleCollector (string? name, int initialThreshold);
new System.Runtime.InteropServices.HandleCollector : string * int -> System.Runtime.InteropServices.HandleCollector
Public Sub New (name As String, initialThreshold As Integer)

參數

name
String

回收行程的名稱。 這項參數可讓您分別針對追蹤控制代碼型別的回收行程加以命名。

initialThreshold
Int32

值,其指定要開始進行回收的點。

例外狀況

initialThreshold 參數小於 0。

適用於

HandleCollector(String, Int32, Int32)

來源:
HandleCollector.cs
來源:
HandleCollector.cs
來源:
HandleCollector.cs

使用名稱、要開始進行控制代碼回收的臨界值以及必須執行控制代碼回收的臨界值,初始化 HandleCollector 類別的新執行個體。

public:
 HandleCollector(System::String ^ name, int initialThreshold, int maximumThreshold);
public HandleCollector (string name, int initialThreshold, int maximumThreshold);
public HandleCollector (string? name, int initialThreshold, int maximumThreshold);
new System.Runtime.InteropServices.HandleCollector : string * int * int -> System.Runtime.InteropServices.HandleCollector
Public Sub New (name As String, initialThreshold As Integer, maximumThreshold As Integer)

參數

name
String

回收行程的名稱。 這項參數可讓您分別針對追蹤控制代碼型別的回收行程加以命名。

initialThreshold
Int32

值,其指定要開始進行回收的點。

maximumThreshold
Int32

值,其指定必須進行回收的點。 這個值應該設定為可用控制代碼的最大數目。

例外狀況

initialThreshold 參數小於 0。

-或-

maximumThreshold 參數小於 0。

maximumThreshold 參數小於 initialThreshold 參數。

適用於