It looks like you’re using a StringHashMap([]const u8)
, so if you want you could use std.BufMap
which is a wrapper around StringHashMap([]const u8)
that will copy the keys/values before inserting them and will also handle freeing the copies for you.
7 Likes