Esempio n. 1
0
        private void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            if (!this.disposed)
            {
                // If disposing equals true, dispose all managed
                // and unmanaged resources.
                StopInPipeThread();

                if (disposing)
                {
                    if (ReadThread != null)
                    {
                        ReadThread.Dispose();
                    }
                }

                dev.CloseDevice();

                // Call the appropriate methods to clean up
                // unmanaged resources here.
                // If disposing is false,
                // only the following code is executed.


                // Note disposing has been done.
                disposed = true;
            }
        }