ThreadPoolBoundHandle.FreeNativeOverlapped(NativeOverlapped*) 方法

定義

重要

此 API 不符合 CLS 規範。

釋放與 NativeOverlapped 方法所分配 AllocateNativeOverlapped 結構相關的記憶體。

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 結構。

屬性

例外狀況

overlappednull

此方法在物體被處理後 ThreadPoolBoundHandle 才被使用。

備註

Caution

你必須 FreeNativeOverlapped 對每個 NativeOverlappedAllocateNativeOverlapped 管理指標呼叫該方法一次。 如果你不呼叫該方法, FreeNativeOverlapped 就會洩漏記憶體。 如果你在同一個非管理指標上NativeOverlapped呼叫該FreeNativeOverlapped方法超過一次,記憶體就會損壞。

適用於