DoxigAlpha

remove

Removes the item from the map and frees its value. This invalidates the value returned by get() for this key.

Function parameters

Parameters

#
self:*BufMap
key:[]const u8

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 remove(self: *BufMap, key: []const u8) void {
    const kv = self.hash_map.fetchRemove(key) orelse return;
    self.free(kv.key);
    self.free(kv.value);
}