On Mon, May 8, 2017 at 3:09 PM,  <varc...@gmail.com> wrote:
>
> I have heard that golang has excellent memory management / garbage
> collection. If I am preforming millions of calculations in a for loop do I
> need to unset a variable before the end of the for loop to help with memory
> or does golang do that for me? I "believe" in PHP a for loop keeps the
> variable in memory until the end of the script and if you want to remove the
> variable from memory you need to unset the variable to help conserve memory.

Go and PHP work very differently.  There is no need to unset a
variable in Go during a loop.  (I don't know if there is a need to do
so in PHP.)

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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to