pub fn init(allocator: Allocator) Self
Create a managed hash map with an empty context. If the context is not zero-sized, you must use initContext(allocator, ctx) instead.
allocator: Allocator
170 171 172 173 174 175 176 177 178 179
pub fn init(allocator: Allocator) Self { if (@sizeOf(Context) != 0) { @compileError("Context must be specified! Call initContext(allocator, ctx) instead."); } return .{ .unmanaged = .empty, .allocator = allocator, .ctx = undefined, // ctx is zero-sized so this is safe. }; }
Create a managed hash map with an empty context. If the context is not zero-sized, you must use initContext(allocator, ctx) instead.