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.

C#
[System.CLSCompliant(false)]
public void FreeNativeOverlapped(System.Threading.NativeOverlapped* overlapped);
C#
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public void FreeNativeOverlapped(System.Threading.NativeOverlapped* overlapped);

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

Ettevaatust!

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

Toode Versioonid
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0