We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
std.heap.GeneralPurposeAllocator
std.heap.DebugAllocator
1 parent f8d0cbf commit b069a0aCopy full SHA for b069a0a
src/main.zig
@@ -2,10 +2,10 @@ const std = @import("std");
2
const MetaModel = @import("MetaModel.zig");
3
4
pub fn main() !void {
5
- var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){};
6
- defer _ = general_purpose_allocator.deinit();
+ var debug_allocator: std.heap.DebugAllocator(.{}) = .init;
+ defer _ = debug_allocator.deinit();
7
8
- const gpa = general_purpose_allocator.allocator();
+ const gpa = debug_allocator.allocator();
9
10
var arg_it = try std.process.ArgIterator.initWithAllocator(gpa);
11
defer arg_it.deinit();
0 commit comments