8 Nov
2023
8 Nov
'23
12:38 p.m.
On Wed Nov 8 12:38:27 2023 +0000, Huw Davies wrote:
Couldn't we just enter the cache section before decrementing the ref count in `ITypeLib2_fnRelease()`? I guess we could, but that feels a bit clunky IMO. We'd be entering/exiting the typelib cache CS every time we AddRef/Release the typelib interface, which seems to happen often.
It's a simpler solution, but the current solution avoids that potential issue. E.g, I don't think we want to cause all AddRef calls on typelib interfaces to block while waiting on a new typelib to be inserted into the cache for example. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4002#note_51481