title: C# 7.0 – Discards and IDisposable out argument
body: <p>Is Discards feature correctly works with IDisposable objects?</p>
  
  <p>Is it call <code>Dispose();</code> when its needed?</p>
  
  <hr>
  
  <p>I have a code:</p>
  
  <pre><code>Boolean existing = Mutex.TryOpenExisting(name: key, rights: MutexRights.ReadPermissions, result: out Mutex _);
  </code></pre>
  
  <p>Here I need only <code>existing</code> variable value.</p>
  
  <p>As you see, I'm trying to use "discard" variable here, but I'm not sure this is correct usage in this case or not.</p>
  
  <p>Because of Mutex obj implements IDisposable.</p>
  
  <p>So which way will be correct in this case? this:</p>
  
  <pre><code>Boolean existing = Mutex.TryOpenExisting(name: key, rights: MutexRights.ReadPermissions, result: out Mutex _);
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>Mutex mutex; 
  Boolean existing = Mutex.TryOpenExisting(name: key, rights: MutexRights.ReadPermissions, result: mutex);
  mutex.Dispose();
  </code></pre>