共用方式為


ThreadPoolBoundHandle.FreeNativeOverlapped(NativeOverlapped*) 方法

定義

重要

此 API 不符合 CLS 規範。

釋放 AllocateNativeOverlapped 方法所配置之與 NativeOverlapped 結構建立關聯的記憶體。

public:
 void FreeNativeOverlapped(System::Threading::NativeOverlapped* overlapped);
[System.CLSCompliant(false)]
public void FreeNativeOverlapped (System.Threading.NativeOverlapped* overlapped);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public void FreeNativeOverlapped (System.Threading.NativeOverlapped* overlapped);
[<System.CLSCompliant(false)>]
member this.FreeNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> unit
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
member this.FreeNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> unit

參數

overlapped
NativeOverlapped*

要釋放之 NativeOverlapped 結構的 Unmanaged 指標。

屬性

例外狀況

overlappednull

處置 ThreadPoolBoundHandle 物件後才呼叫這個方法。

備註

警告

您必須在使用 AllocateNativeOverlapped 方法所配置的每個 NativeOverlapped Unmanaged 指標上,只呼叫 FreeNativeOverlapped 方法一次。 如果您未呼叫 FreeNativeOverlapped 方法,將會流失記憶體。 如果您在相同的 NativeOverlapped Unmanaged 指標上多次呼叫 FreeNativeOverlapped 方法,記憶體將會損毀。

適用於