Fix a memory leak, maybe?

This commit is contained in:
Adam Millerchip 2022-08-12 00:32:02 +09:00
parent 59157c5a11
commit c02b8af2aa

View file

@ -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)});
}