UnregisterClass function may leak memory
The UnregisterClass function may leak memory when called to unregister a window class that was registered within an activation context.
Dynamic link libraries (DLLs) that register their own window classes are responsible for unregistering those window classes when the DLL is unloaded. The memory leak that may occur in the UnregisterClass function can increase each time a DLL that registers its window classes within an activation context is loaded and unloaded in a process.
For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB2624911.