pub fn deinit(self: *Map) void self: *Map169
170
171
172
173
174
175 pub fn deinit(self: *Map) void {
const gpa = self.allocator;
for (self.keys()) |key| gpa.free(key);
for (self.values()) |value| gpa.free(value);
self.array_hash_map.deinit(gpa);
self.* = undefined;
}
Free the backing storage of the map, as well as all of the stored keys and values.