3 ms·
As people have pointed already elsewhere, the same declaration can be made more clear by isolating the type like so: var gpa: std.mem.GeneralPurposeAllocat
by kristoff_it 2y ago
As people have pointed already elsewhere, the same declaration can be made more clear by isolating the type like so:
var gpa: std.mem.GeneralPurposeAllocator(.{}) = .{};
- declan_roberts 2y agoAh yes. Much more clear. Thank you.
- mlugg 2y agoAlso note that on Zig master, initializing `GeneralPurposeAllocator` like this is deprecated -- it'll be removed after the next release. Instead, you should do this: var gpa: std.mem.GeneralPurposeAllocator(.{}) = .init;