ThreadPoolBoundHandle.FreeNativeOverlapped(NativeOverlapped*) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
重要
此 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 結構。
- 屬性
例外狀況
overlapped 是 null。
此方法在物體被處理後 ThreadPoolBoundHandle 才被使用。
備註
Caution
你必須 FreeNativeOverlapped 對每個 NativeOverlapped 未 AllocateNativeOverlapped 管理指標呼叫該方法一次。 如果你不呼叫該方法, FreeNativeOverlapped 就會洩漏記憶體。 如果你在同一個非管理指標上NativeOverlapped呼叫該FreeNativeOverlapped方法超過一次,記憶體就會損壞。