On Thu, 6 Aug 2026 08:00:16 GMT, Matthias Baesken <[email protected]> wrote:

> > https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setclipboarddata
> 
> That does tell me that we are not supposed to call free.

I looked a little more into it and it seems in case of a successful  
SetClipboardData we must not call free ; but in case of a failing call like


    if (SetClipboardData(CF_UNICODETEXT, hMem) == NULL) {
        GlobalFree(hMem);
        CloseClipboard();
    }


we have to free resources ; currently we only have some VERIFY (assert in debug 
case).

-------------

PR Comment: https://git.openjdk.org/jdk/pull/32206#issuecomment-5202511131

Reply via email to