title: Windows Server 2012 won't unload DLL in a process
body: <p>I've created a program that creates a thread, loads a DLL there (LoadLibrary), calls one function in this DLL and unloads it using FreeLibrary. </p>
  
  <p>LoadLibrary and FreeLibrary do not return any error codes, but ProcessHacket2 shows that this DLL still exists in memory. I've verified that my code does not reference this library.</p>
  
  <p>After some time my code repeats these actions and another instance of this DLL appears in the process memory. </p>
  
  <p>If my code will repeats these actions again and again a new instance will remain in RAM. Allocated virtual memory will growth.</p>
  
  <p>I cannot repeat this problem on my development machine and other test computers. Only on one specific server.</p>
  
  <p>It looks like (libmysql.dll):
  <a href="https://i.stack.imgur.com/XgqQZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XgqQZ.png" alt="enter image description here"></a></p>