;;;; A Vec is move-only: passing one to a function transfers ownership, and the ;;;; source binding is dead afterwards. That rule is what makes a double free ;;;; unrepresentable, which is why `free` needs no analysis of its own. (defn take [v (Vec i32)] i32 (let [n (len v)] (free v) n)) (defn main [] i32 (let [v (vec-new i32)] (push v 1) (println (take v)) ;; v went with the call. Being refused here is the whole test. (println (len v)) 0))