示例#1
0
        private void ReleaseHandle()
        {
            Monitor.Enter(this);
            try
            {
                this.handleCount--;

                if (this.handleCount == 0)
                {
                    ScpCommands.Close(this.handle);
                    this.handle = IntPtr.Zero;
                }
            }
            finally
            {
                Monitor.Exit(this);
            }
        }