Skip to content

Memory (no GC)

Vow has no garbage collector and no manual free(). Values live in arenas. For allocations that never leave a function, the compiler works out when memory is no longer needed (vow explain reports LOCAL). Scoped region { } blocks reclaim scratch early.

fn work() -> int {
let keep = "outer"
region {
let scratch = str_join(["a", "b", "c"], "-")
print scratch
}
print keep
return 7
}

Analysis is intraprocedural and conservative: escaping values live until the root arena (or enclosing region) is destroyed.