共用方式為


Overlapped.Free(NativeOverlapped*) 方法

定義

重要

此 API 不符合 CLS 規範。

釋放 Unmanaged 記憶體,而此記憶體與 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

備註

您必須在從 Pack 方法收到的每個 NativeOverlapped 指標上,只呼叫 Free 方法一次。 如果您未呼叫 Free 方法,將會流失記憶體。 如果您多次呼叫 Free 方法,記憶體將會損毀。

適用於