flan/test/programs/string-leak.flan

10 lines
309 B
Plaintext

;;;; A dev build's registry names a String's block by its type: the one freed
;;;; is gone from the report at exit, the one kept is listed under String.
(defn main [] i32
(let [kept (string-new "kept")
gone (string-new "gone")]
(append kept " for good")
(free gone)
(println kept))
0)