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 结构。

属性

例外

overlappednull

在释放 ThreadPoolBoundHandle 对象后调用此方法。

注解

注意

对于使用 方法分配的每个NativeOverlapped非托管指针,必须FreeNativeOverlapped恰好调用方法一AllocateNativeOverlapped次。 如果不调用 FreeNativeOverlapped 方法,则会泄漏内存。 如果在同一NativeOverlapped非托管指针上多次调用 FreeNativeOverlapped 方法,内存将损坏。

适用于