On Thu, Dec 22, 2016 at 8:16 AM,  <[email protected]> wrote:
>
> I was just toying around with pointers to slice elements, and I ended up
> with this Go program: https://play.golang.org/p/D6e2SHEW1f. By the end of
> the program, all references to memory in the main function are dropped, but
> memory isn't freed after a call to runtime.GC(). This happens both in the Go
> Playground and on my local machine (though the latter is running Go 1.6).
>
> Is it just that runtime.GC() is not triggering a full GC and a later run
> would clear the memory? Any insight here would be appreciated, as I'm really
> curious now. Also, this isn't just a toy problem; it reflects some actual
> code I'm working on.

How are you determining that "memory isn't freed"?  There are several
possible meanings for that.

Ian

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to