Xml.free gives back a parsed tree's records and lists (never its strings) and the parser's cursor is freed; ludic.ui frees a template's XML once built, sel_parse's and ex_parse's readers, lss_rule's declarations holder, and px_cmp no longer makes a list of its operators per call

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 00:11:40 +03:00
parent 3816d9924b
commit 7b20f305ff
8 changed files with 40 additions and 8 deletions

View file

@ -39,7 +39,9 @@ function lib_read(ui_st: mut UiState, src: string, path: string) -> UiFile {
let f = lib_new(ui_st, path)
f.src = src
tp_lines(ui_st, src)
let root = tpl_read(ui_st, Xml.parse(src), path)
let doc = Xml.parse(src)
let root = tpl_read(ui_st, doc, path)
Xml.free(doc) # the template keeps the tree's strings, never its nodes
var tops = root.kids
if root.tag != "ui" { tops = [root] }
for i in 0 .. len(tops) { lib_top(ui_st, f, tops[i]) }