https://bugs.winehq.org/show_bug.cgi?id=46180
Bug ID: 46180 Summary: wineserver does not unregister windows classes on process termination Product: Wine Version: 3.20 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: wineserver Assignee: wine-bugs@winehq.org Reporter: ralf.habacker@freenet.de Distribution: ---
According to (https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-regi...), Windows unregisters window classes registered by a process at process termination, which is not implemented in wine and leads to resource leaks.
This can lead to an overflow of the global atom table in long running processes, where wineserver is not restarted.
At this point (https://github.com/wine-mirror/wine/blob/master/server/class.c#L159 and https://github.com/wine-mirror/wine/blob/master/server/class.c#L166) an atom is created or the Usage counter incremented, but when destroyed ( https://github.com/wine-mirror/wine/blob/master/server/class.c#L77), the counter is not decremented, which would have to happen with a call to release_global_atom().