DoxigAlpha

deinit

this method should only be used with init() and not with initComptime().

Function parameters

Parameters

#
allocator:mem.Allocator

Static string map optimized for small sets of disparate string keys.

Functions

#
StaticStringMap
Static string map optimized for small sets of disparate string keys.
defaultEql
Like `std.mem.eql`, but takes advantage of the fact that the lengths
eqlAsciiIgnoreCase
Like `std.ascii.eqlIgnoreCase` but takes advantage of the fact that
StaticStringMapWithEql
StaticStringMap, but accepts an equality function (`eql`).

Source

Implementation

#
pub fn deinit(self: Self, allocator: mem.Allocator) void {
    allocator.free(self.len_indexes[0..self.len_indexes_len]);
    allocator.free(self.kvs.keys[0..self.kvs.len]);
    allocator.free(self.kvs.values[0..self.kvs.len]);
    allocator.destroy(self.kvs);
}