title: GetDC function in separate thread takes too long to return
body: <p>I am learning OpenGL and using windows api for windowing. I have a rendering function and at the end it calls <code>SwapBuffers(deviceContext)</code>.</p>
  
  <p>At first I used <code>GetDC()</code> to obtain the DC handle (like this: <code>SwapBuffers(GetDC(hWND))</code>, and it worked smoothly (without releasing it).
  When I tried to move the rendering to a separate thread it worked properly for a couple of hundred frames, after <code>GetDC()</code> slowed down dramatically, like it took less than 1ms to return and and suddenly over 300ms. This caused decreasing FPS. After I found the root cause I changed to store DC once at the beginning and release on exit, and now it's working.</p>
  
  <p>The question is why <code>GetDC()</code> without <code>ReleaseDC()</code> slows down so drastic and sudden, when I call it couple of hundred times in a separate thread from window class? It doesn't do in the main thread.</p>