title: Should HttpClient instances created by HttpClientFactory be disposed?
body: <p>So, I've registered a named client with the services collection in my Startup.cs:</p>
  
  <pre class="lang-cs prettyprint-override"><code>services.AddHttpClient(someServiceName, 
                         client =&gt; client.BaseAddress = baseAddress);
  </code></pre>
  <p>and now can inject an <code>IHttpClientFactory</code> from my service provider.</p>
  <p>Using this <code>IHttpClientFactory</code>, I conjure up a client instance:</p>
  <pre class="lang-cs prettyprint-override"><code>var client = httpClientFactory.CreateClient(someServiceName)
  </code></pre>
  <p>Once upon a time, it was necessary to be very careful about the disposing of <code>HttpClient</code> instances, as it was <a href="https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/" rel="noreferrer">rarely the right thing to do</a>.</p>
  <p>However, now we have <code>HttpClientFactory</code>, does this matter any more? Should/Can this <code>client</code> be disposed without worry? e.g.</p>
  <pre class="lang-cs prettyprint-override"><code>using (var httpClient = httpClientFactory.CreateClient(someServiceName))
  using (var response = await httpClient.PostAsync(somePath, someData))
  {
      var content = await response.Content.ReadAsAsync&lt;SomeResponse&gt;();
      //...
  }
  </code></pre>