Merge pull request #6174 from antisaling/push-uovqmomtyvul

encoding/xml: pass allocator on destroy
This commit is contained in:
Jeroen van Rijn
2026-01-26 09:07:40 +01:00
committed by GitHub

View File

@@ -386,7 +386,8 @@ load_from_file :: proc(filename: string, options := DEFAULT_OPTIONS, error_handl
return parse_bytes(data, options, filename, error_handler, allocator)
}
destroy :: proc(doc: ^Document) {
destroy :: proc(doc: ^Document, allocator := context.allocator) {
context.allocator = allocator
if doc == nil { return }
for el in doc.elements {