I may be misunderstanding what you're suggesting, but I believe Go already tries to detect when a value can be placed on the stack. Then, it will be freed automatically when it falls out of scope.
On Sun, Nov 15, 2020 at 5:20 PM tapi...@gmail.com <tapir....@gmail.com> wrote: > > For example, some local memory allocations could be detected no used > elsewhere so that they can may be freed immediately when out of reach > instead of waiting to be freed in the GC phase. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/5c38b239-fe56-44ce-aaf6-61636a682707n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/5c38b239-fe56-44ce-aaf6-61636a682707n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu0-AydQ0K1GO_-fibaEqNGAN-dAQk%3DL4LAmNVAmTta8yw%40mail.gmail.com.