From 9b94a4ec4947d7029e6f5d94e331c761067bfbe7 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 17 Nov 2023 16:41:42 +0100 Subject: [PATCH] dom: deinit matcher with HTMLCollection --- src/dom/html_collection.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dom/html_collection.zig b/src/dom/html_collection.zig index c9e02b22..cbe309b0 100644 --- a/src/dom/html_collection.zig +++ b/src/dom/html_collection.zig @@ -73,6 +73,10 @@ pub const HTMLCollection = struct { cur_idx: ?u32 = undefined, cur_node: ?*parser.Node = undefined, + pub fn deinit(self: *HTMLCollection, allocator: std.mem.Allocator) void { + self.match.deinit(allocator); + } + // get_next iterates over the DOM tree to return the next following node or // null at the end. //