Found by reading every builtin (Os.platform's 8 KB per call started it). Log builds its line only at or above the threshold and frees it; DateTime.format folds through + so its pieces go; Input.text encodes into one buffer; Path/Mime/Fs/Os free their temporaries on every path; string results of Text/Path/Mime/DateTime/Os dirs are fresh and Text frees a fresh argument. Reseeded. runtime_temps.ludic: 19.8 MB -> 0 over 20,000 rounds, 64 KB -> 0 over 200 of file work; clean under MallocScribble. string_temps still 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 KiB
1 KiB
bump: patch type: fix The runtime's text builtins keep nothing a call does not hand back.
Log.*builds nothing below the threshold (as documented) and frees the line it writes; a number field's text and a made message go too. ALog.debugin a frame loop left its line every frame.DateTime.formatfrees each field's digits and each piece joined so far.Input.text()writes the typed text into one buffer instead of joining a string per character.Path.stem/Path.normalize,Mime.of/Mime.sniff,Fs.write_text/copy/mkdirandOs.save_dir/config_dir/cache_dirfree their working copies, on every way out.- Every string
Text.*,Path.*,Mime.*,DateTime.formatand theOsdirectories return is fresh, so a comparison, a+or aprintthat reads it frees it; a string made for aTextcall's argument (Text.to_int(string(n))) is freed once read.examples/lang/runtime_temps.ludic: 20,000 rounds grew 19.8 MB before and 0 after; 200 rounds of file work 64 KB before and 0 after.