logoalt Hacker News

nixon_why69today at 6:54 AM1 replyview on HN

Been a while since I used go but I remember it being kind of uniquely hard to tell? Like a struct is on the stack, but a *struct is maybe on the heap, depending on escape analysis?


Replies

DanielHBtoday at 9:18 AM

isn't it the exact same as C in this regard? The pointer being on the stack or not depends how it was originally allocated.

show 1 reply