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.
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.