• Show log

    Commit

  • Hash : 797a6910
    Author : Sam Lantinga
    Date : 2020-12-09T20:28:51

    Fixed bug 5375 - WGI: Fix HSTRING memory leak.
    
    Joel Linn
    
    TLDR; https://godbolt.org/z/43fd8G
    
    Let's deduce this from C++ reference code:
    
    https://docs.microsoft.com/en-us/cpp/cppcx/wrl/how-to-activate-and-use-a-windows-runtime-component-using-wrl?view=msvc-160
    At the bottom of the page there is this snippet:
    ```
    int wmain()
    {
        /* ... more code ... */
    
        // Get the domain part of the URI.
        HString domainName;
        hr = uri->get_Domain(domainName.GetAddressOf());
        if (FAILED(hr))
        {
            return PrintError(__LINE__, hr);
        }
    
        // Print the domain name and return.
        wprintf_s(L"Domain name: %s\n", domainName.GetRawBuffer(nullptr));
    
        // All smart pointers and RAII objects go out of scope here.
    }
    ```
    
    `HString` is defined in `corewrappers.h` and the call chain for the destructor is:
    `~HString() -> Release() -> ::WindowsDeleteString()`
    
    QED
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/SDL.git
    Git SSH git@git.kmx.io:kc3-lang/SDL.git
    Public access ? public
    Description

    Fork of https://github.com/libsdl-org/SDL

    Users
    kc3_lang_org thodg_w www_kmx_io thodg_l thodg thodg_m
    Tags