ludic/docs/language/json/json-free_all.md
Orkuncakilkaya 22d1e2d66a Os.heap_bytes: the heap without the renderer; string_temps reads it
Vk.heap_bytes pulled the Vk module - and on lang/uifree the GL window path - into a plain program,
which then failed to link (_cgl_offscreen, lgl_GetError). Os.heap_bytes is malloc_zone_statistics
through a weak reference (0 where there is none, and on Windows). Reseeded. Docs for it and for
Json.free / Json.free_all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 12:31:42 +03:00

729 B

id name category kind tokens sig tip order ns member
json-free_all Json.free_all json namespace-method Json.free_all Json.free_all(value) -> void Give back a parsed tree whole, strings and keys included. 4 Json free_all

Json.free and every string value and object key the parser made as well: for a reader that copied whatever it keeps (s[0 .. len(s)]), so the whole document goes. A text read, parsed and let go this way leaves nothing behind.

program FreeAll {
  entry {
    let doc = Json.parse("{\"name\": \"camp\"}")
    let s = value_as_str(value_get(doc, "name"))
    let name = s[0 .. len(s)]
    Json.free_all(doc)
    print(name)
  }
}