title: ctypes unload dll
body: <p>I am loading a dll with ctypes like this:</p>
  
  <pre><code>lib = cdll.LoadLibrary("someDll.dll");
  </code></pre>
  
  <p>When I am done with the library, I need to unload it to free resources it uses.  I am having problems finding anything in the docs regarding how to do this.  I see this rather old post: <a href="https://stackoverflow.com/questions/359498/how-can-i-unload-a-dll-using-ctypes-in-python">How can I unload a DLL using ctypes in Python?</a>.  I am hoping there is something obvious I have not found and less of a hack.</p>