You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi golang-nuts,
Does the Go garbage collector have any trouble with circular references? For
example, if a struct has a function field containing a closure that refers back
to that struct, will the struct be garbage collected if it's not otherwise
referenced?
I imagine the answer is "duh, of course it will be collected", but I want to
check to be sure. Both for the current version of Go and any planned future GC
work.
Thank you,
Aaron
David Symonds
unread,
Mar 30, 2015, 10:24:23 PM3/30/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Aaron Jacobs, golang-nuts
Go's GC is a mark-and-sweep collector. It works fine with cycles.
Aaron Jacobs
unread,
Mar 30, 2015, 10:36:27 PM3/30/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to David Symonds, golang-nuts
On Tue, Mar 31, 2015 at 1:24 PM, David Symonds <dsym...@golang.org> wrote:
> Go's GC is a mark-and-sweep collector. It works fine with cycles.
Great, and I'll take that to include the upcoming new collector, too.
Thanks for confirming.
djhe...@gmail.com
unread,
Mar 30, 2015, 10:40:32 PM3/30/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message