Bewerken

Delen via


ThreadPoolBoundHandle.FreeNativeOverlapped(NativeOverlapped*) Method

Definition

Important

This API is not CLS-compliant.

Frees the memory associated with a NativeOverlapped structure allocated by the AllocateNativeOverlapped method.

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

Parameters

overlapped
NativeOverlapped*

An unmanaged pointer to the NativeOverlapped structure to be freed.

Attributes

Exceptions

overlapped is null.

This method was called after the ThreadPoolBoundHandle object was disposed.

Remarks

Caution

You must call the FreeNativeOverlapped method exactly once on every NativeOverlapped unmanaged pointer allocated by using the AllocateNativeOverlapped method. If you do not call the FreeNativeOverlapped method, you will leak memory. If you call the FreeNativeOverlapped method more than once on the same NativeOverlapped unmanaged pointer, memory will be corrupted.

Applies to