Fix a memory leak, maybe?
This commit is contained in:
parent
59157c5a11
commit
c02b8af2aa
1 changed files with 2 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
const std = @import("std");
|
||||
const gpa = @import("util.zig").gpa;
|
||||
const Allocator = std.mem.Allocator;
|
||||
const ArrayList = std.ArrayList;
|
||||
const tokenize = std.mem.tokenize;
|
||||
const parseInt = std.fmt.parseInt;
|
||||
|
@ -13,6 +14,7 @@ const Rule = struct {
|
|||
|
||||
pub fn main() !void {
|
||||
const rules = try parse();
|
||||
defer Allocator.free(gpa, rules);
|
||||
print("Part 1: {d}\n", .{part1(rules)});
|
||||
print("Part 2: {d}\n", .{part2(rules)});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue