http://bugs.winehq.org/show_bug.cgi?id=58503
--- Comment #3 from mata sutupud@yahoo.com --- Created attachment 79195 --> http://bugs.winehq.org/attachment.cgi?id=79195 fix info.hbmColor and info.hbmMask never being freed
Since it still happens on wine 10.13 I investigated some more.
Running with WINEDEBUG=+gdi shows that (only) while the mouse cursor is visible in the game menu, the gdi allocated object count keeps incrasing rapidly, e.g. after a little while:
0024:trace:gdi:alloc_gdi_handle allocated NTGDI_OBJ_BITMAP 0x3009006a 1051/65536
I tried other applications, but from those I tested only Saints Row 3 and 4 showed this rapid increase and therfore can reach the maximum of 65536 in a reasonable time (the more time is spent with the menu open the faster it happens). The problem itself is also observable by running
WINEDEBUG=+gdi DISPLAY= wine notepad
and then moving the mouse in and out of the text area so the cursor changes, and observer the constant increase in allocations with each change.
Seems that there is a leak in wayland_pointer.c:wayland_pointer_set_cursor_shape(...), the bitmaps allocated inside the info object by get_icon_info(...) are never released.
The attached patch seems to work to stop this issue.