OpenImageIO icon indicating copy to clipboard operation
OpenImageIO copied to clipboard

memory leak in ustring

Open DougRogers opened this issue 2 years ago • 0 comments
trafficstars

ustring cpp

    ustring::TableRep* make_rep(string_view str, size_t hash)
    {
        char* repmem = pool_alloc(sizeof(ustring::TableRep) + str.length() + 1);
        return new (repmem) ustring::TableRep(str, hash);
    }

        ustring::TableRep* rep = make_rep(str, hash);
        entries[pos]           = rep;

all entries are not freed. The only call I see is

free(entries);

DougRogers avatar Jul 15 '23 02:07 DougRogers