public void FreeMemory() { if (FreeFlag.IsFirstCall()) { try { CancelRegistration._DisposeSafe(); InBufferPinHolder._DisposeSafe(); OutBufferPinHolder._DisposeSafe(); lock (LockObj) { if (Overlapped != null) { if (NativeOverlapped != null) { Overlapped.Unpack(NativeOverlapped); Overlapped.Free(NativeOverlapped); NativeOverlapped = null; } Overlapped = null; } } } catch { } } }