I've seen quite a few code snippets that always use ReleaseDC after using GetDC. Is this necessary?

I'm just using GetDC() to get the device context of a window by its hWnd.