Overlapped.Free Method (NativeOverlapped*)

 

Frees the unmanaged memory associated with a native overlapped structure allocated by the Pack method.

This API is not CLS-compliant.

Namespace:   System.Threading
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
[CLSCompliantAttribute(false)]
public static unsafe void Free(
	NativeOverlapped* nativeOverlappedPtr
)

Parameters

nativeOverlappedPtr
Type: System.Threading.NativeOverlapped*

A pointer to the NativeOverlapped structure to be freed.

Exception Condition
ArgumentNullException

nativeOverlappedPtr is null.

You must call the Free method exactly once on every NativeOverlapped pointer you receive from the Pack method. If you don't call the Free method, you will leak memory. If you call the Free method more than once, memory will be corrupted.

SecurityCriticalAttribute

Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: