Question about functors and closures (I think 😅), with an example, but really a general Q

It’s definetly fixed, though, by just putting the instantiation in a fct, as you said…

julia> function test_me() r2=RNG(999); for _ in 1:1_000_000 r2() end; end
 Memory estimate: 0 bytes, allocs estimate: 0.