Exemplo n.º 1
0
        /// <summary>
        /// Defines a method to release allocated resources.
        /// </summary>
        public void Dispose()
        {
            _lock.Dispose();

            if (_store is IDisposable)
            {
                ((IDisposable)_store).Dispose();
            }

            _store = null;
        }
Exemplo n.º 2
0
      // IDisposable
      protected virtual void Dispose(bool disposing)
      {
          if (!_isDisposed)
          {
              if (disposing)
              {
                  // dispose managed state (managed objects).
              }

              _lockStrategy.Dispose();
              _lockStrategy = null;
          }
          _isDisposed = true;
      }
Exemplo n.º 3
0
        protected virtual void Dispose(bool disposing)
        {
            if (!_isDisposed)
            {
                if (disposing)
                {
                    //dispose managed resrources here
                    _dict = null;
                }

                //dispose unmanaged resrources here
                _lockController.Dispose();
                _lockController = null;
                _isDisposed     = true;
            }
        }
Exemplo n.º 4
0
        public void DisposedWithWriters()
        {
            ILockStrategy  l      = LockFactory.Create();
            ThreadedWriter thread = new ThreadedWriter(l);

            try
            {
                l.Dispose();
            }
            finally
            {
                try { thread.Dispose(); }
                catch (ObjectDisposedException)
                { }
            }
        }
Exemplo n.º 5
0
 public void Dispose()
 {
     try
     {
         _readLock.Dispose();
     }
     finally
     {
         try
         {
             _writeLock.Dispose();
         }
         finally
         {
             _write.Dispose();
         }
         _read.Dispose();
     }
 }
Exemplo n.º 6
0
 public void Dispose()
 {
     _lock.Dispose();
 }