You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

SignalProcessor.cs 512 B

2 years ago
123456789101112131415161718192021
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Runtime.InteropServices;
  5. using System.Threading;
  6. namespace Dbcc
  7. {
  8. public sealed class SignalProcessor : IDisposable
  9. {
  10. private IntPtr _handle = IntPtr.Zero;
  11. protected virtual void Dispose() {
  12. IntPtr currentEngine = Interlocked.Exchange(ref _handle, IntPtr.Zero);
  13. if (currentEngine != IntPtr.Zero) {
  14. NativeInterop.Dispose(currentEngine);
  15. }
  16. }
  17. }
  18. }