Brendan Shanks (@bshanks) commented about dlls/winemac.drv/surface.c:
if (!(window_surface = window_surface_create(sizeof(*surface), &macdrv_surface_funcs, hwnd, rect, info, bitmap))) { if (bitmap) NtGdiDeleteObjectApp(bitmap); CGDataProviderRelease(provider);
IOSurfaces need to be released here if window_surface_create fails