title: Is a disposable object in my iDisposable class guaranteed to be released from memory?
body: <p>Given the following class:</p>
  
  <pre><code>public sealed class DistributedLock : IDisposable
  {
      private IRedLock Lock { get; }
      private bool _disposed;
  
      public DistributedLock(string lockKey, TimeSpan expiry)
      {
          Lock = RedLockController.GetConnection().CreateLock(lockKey, expiry);
      }
  
      private void Dispose(bool disposing)
      {
          if (_disposed)
              return;
  
          if (disposing)
          {
              if (Lock != null)
              {
                  Lock.Dispose();
              }
          }
  
          _disposed = true;
      }
  
      public void Dispose()
      {
          Dispose(true);
          GC.SuppressFinalize(this);
      }
  
      ~DistributedLock()
      {
          Dispose(false);
      }
  }
  </code></pre>
  
  <p>Where <code>IRedLock</code> implements <code>iDisposable</code>, and I use the above class in the following way:</p>
  
  <pre><code>using(new DistributedLock("SomeKey"))
  {
      ... do something
  }
  </code></pre>
  
  <p>Will the <code>DistributedLock</code> and contained <code>IRedLock</code> class be released from memory under all circumstances?</p>