Nothing about lambdas requires heap allocation. See also: C++, Rust
If the lambda captures some value, and also outlives the current scope, then that captured value has to necessarily be heap allocated.
If the lambda captures some value, and also outlives the current scope, then that captured value has to necessarily be heap allocated.