private void Dispose(bool disposing) { var handle = Interlocked.Exchange(ref _handle, IntPtr.Zero); if (handle != IntPtr.Zero) { Interop.DeleteContext(handle); } }
/// <summary> /// Frees the context handle. /// </summary> protected override bool ReleaseHandle() { Interop.DeleteContext(handle); return(true); }