Overlapped.Free(NativeOverlapped*) 方法

定义

重要

此 API 不符合 CLS。

释放与 Pack 方法分配的本机重叠结构关联的非托管内存。

public:
 static void Free(System::Threading::NativeOverlapped* nativeOverlappedPtr);
[System.CLSCompliant(false)]
public static void Free (System.Threading.NativeOverlapped* nativeOverlappedPtr);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public static void Free (System.Threading.NativeOverlapped* nativeOverlappedPtr);
[<System.CLSCompliant(false)>]
static member Free : nativeptr<System.Threading.NativeOverlapped> -> unit
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
static member Free : nativeptr<System.Threading.NativeOverlapped> -> unit

参数

nativeOverlappedPtr
NativeOverlapped*

指向要释放的 NativeOverlapped 结构的指针。

属性

例外

nativeOverlappedPtrnull

注解

必须在FreePack方法收到的每个NativeOverlapped指针上调用该方法一次。 如果不调用 Free 该方法,则会泄漏内存。 如果多次调用 Free 该方法,内存将损坏。

适用于