title: Object is not disposed along all execution paths
body: <p>I have the following code.</p>
  
  <pre><code>private DataTable LoadSMSCellProviders()
  {
      string sqlQuery = "Select * from SMSAddress";
      DataTable dt = new DataTable();
      using (SqlConnection conn = new SqlConnection(Utility.ConnString))
      {
          using (SqlCommand command = new SqlCommand(sqlQuery, conn))
          {
              SqlDataAdapter adapter = new SqlDataAdapter(command);
              adapter.Fill(dt);
              return dt;
          }
      }
  }
  </code></pre>
  
  <p>The Microsoft Code Analysis is telling me that <code>dt</code> is not disposed along all execution paths, but I am not sure how to correct this. If I try to call <code>dispose</code> on it before the <code>return</code>, it will return a null value, and if I try to do it at the end of the method, the code is never reached...</p>
  
  <p>What am I missing here?</p>
  
  <p>This is the message from the analysis tool:</p>
  
  <blockquote>
    <p>warning : CA2000 : Microsoft.Reliability : In method 'x.x()', object
    'dt' is not disposed along all exception paths. Call
    System.IDisposable.Dispose on object 'dt' before all references to it
    are out of scope.</p>
  </blockquote>