https://bugs.winehq.org/show_bug.cgi?id=56717
--- Comment #3 from Fabian Maurer dark.shadow4@web.de --- Thanks for testing!
What about collections created using get_system_fontcollection? My last approach was handling those as they currently are, which means we have two different types of font collections - those that are owned by the factory and those that are not.
And then we have the problem that the returned object should be released, but the one owned by the factory should not. To keep the life cycle of the objects easier to understand, I introduced wrapper objects for the cached collections. Without those we'd need two ref counters / revive objects that already reached ref count 0 and that seemed worse... It still gets kinda ugly since we have that dualism, I don't think those wrapper objects are exactly pretty either.
I have a WIP implementation here: https://gitlab.winehq.org/DarkShadow44/wine/-/commits/font-cache
How do you suggest dealing with those issues?