title: IDisposable : Memory leaks
body: <p>I'm currently do a review of a C# app in which I see that :</p>
  
  <pre><code>public static bool ServiceExists(string servicename)
  {
      ServiceController[] services = ServiceController.GetServices();
      foreach (ServiceController s in services)
      {
          if (s.ServiceName == servicename)
          {
              return true;
          }
      }
      return false;
  }
  </code></pre>
  
  <p>In this <a href="https://stackoverflow.com/questions/6865330/will-ignoring-idisposable-cause-memory-leaks/6865401#6865401">answer</a>, Henk said that the non-use of <code>Dispose()</code> (or <code>using</code>) will not generate memory leaks, true or false?</p>
  
  <p>Can I keep the previous code has it is or should I write someting like : </p>
  
  <pre><code>public static bool ServiceExists(string servicename)
  {
      ServiceController[] services = ServiceController.GetServices();
      bool exists = false;
  
      foreach (ServiceController s in services)
      {
          using(s)
          {
              if (s.ServiceName == servicename)
              {
                  exists = true;
              }
          }
      }
  
      return exists;
  }
  </code></pre>
  
  <p>What are the risks to no using <code>Dispose()</code> (or <code>using</code>) in this case?</p>