コード例 #1
0
            public void Dispose()
            {
                lock (_gate)
                {
                    if (!_disposed)
                    {
                        _source.Dispose();
                        _buffer.Clear();
                    }

                    _disposed = true;
                }
            }
コード例 #2
0
            public void Dispose()
            {
                lock (_source)
                {
                    if (!_disposed)
                    {
                        _source.Dispose();
                        _source = null;

                        _buffer.Clear();
                        _buffer = null;
                    }

                    _disposed = true;
                }
            }