ThreadPoolBoundHandle.FreeNativeOverlapped(NativeOverlapped*) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
重要
此 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 指標。
- 屬性
例外狀況
overlapped
為 null
。
處置 ThreadPoolBoundHandle 物件後才呼叫這個方法。
備註
警告
您必須在使用 AllocateNativeOverlapped 方法所配置的每個 NativeOverlapped Unmanaged 指標上,只呼叫 FreeNativeOverlapped 方法一次。 如果您未呼叫 FreeNativeOverlapped 方法,將會流失記憶體。 如果您在相同的 NativeOverlapped Unmanaged 指標上多次呼叫 FreeNativeOverlapped 方法,記憶體將會損毀。