by foldr · 2y ago · 0 comments
This is only the case for pointers that the compiler can't prove not to escape:
>In the current compilers, if a variable has its address taken, that variable is a candidate for allocation on the heap. However, a basic escape analysis recognizes some cases when such variables will not live past the return from the function and can reside on the stack.
https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename...
https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename...