In addition to Axel's useful info, whenever you are interested in what 
escapes to the 'heap', it  can be helpful to build with escape analyses 
output. Try using "go build  -gcflags=-m". 

On Wednesday, July 5, 2023 at 8:35:52 PM UTC-4 chris...@meessen.net wrote:

> Hello,
>
> Closure need space to store the captured variables. According to 
> runtime.MemStats, it is not on the heap. Where are these variable stored ? 
> On the stack ?
>

-- 
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/9ed36da2-c466-420a-8724-fdd9f14455fan%40googlegroups.com.

Reply via email to