On Thu Jun 18 18:08:45 2026 +0000, Rose Hellsing wrote:
Oh yeah I missed an `if (delete)` Though looking at the MSDN docs for that function, the argument is `deleteWmf` and is described as "\[...\] whether the Windows handle to a metafile is deleted when the metafile is deleted." In which if I understand it right, this function shouldn't call delete at all and only set `preserve_hwmf` like it already does in line 4404? Yes, I believe it was there previously because we didn't have the ability to store the metafile handle in the object we're creating. So whoever wrote that must have thought that it was better to free the handle early and risk the application using it, than to leak it.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11180#note_143646