using System; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; using System.Threading; namespace Dbcc { public sealed class SignalProcessor : IDisposable { private IntPtr _handle = IntPtr.Zero; protected virtual void Dispose() { IntPtr currentEngine = Interlocked.Exchange(ref _handle, IntPtr.Zero); if (currentEngine != IntPtr.Zero) { NativeInterop.Dispose(currentEngine); } } } }