Free Method
Collapse the table of content
Expand the table of content

Overlapped.Free Method (NativeOverlapped*)


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

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

public static unsafe void Free(
	NativeOverlapped* nativeOverlappedPtr


Type: System.Threading.NativeOverlapped*

A pointer to the NativeOverlapped structure to be freed.

Exception Condition

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.


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

.NET Framework
Available since 1.1
Available since 2.0
Return to top
© 2015 Microsoft