DoxigAlpha

deinit

Free the backing storage of the map, as well as all of the stored keys and values.

Function parameters

Parameters

#
self:*BufMap

BufMap copies keys and values before they go into the map and

Types

#
BufMap
BufMap copies keys and values before they go into the map and

Source

Implementation

#
pub fn deinit(self: *BufMap) void {
    var it = self.hash_map.iterator();
    while (it.next()) |entry| {
        self.free(entry.key_ptr.*);
        self.free(entry.value_ptr.*);
    }

    self.hash_map.deinit();
}