On Thursday, 26 February 2026 at 20:03:04 UTC Slawomir Pryczek wrote: my concern is about GC'ing timers (stopped or unstopped) after they fired and there is nothing on the other side to "receive" the message (there is only writer [with or without a pending write] AND [no reader] )
I think even with Go <1.23 this was fine - but it was only garbage collected after it fired. A channel with no references pointing at it will be garbage collected. This applies to a buffered channel even if there are messages contained within it, in the same way that a slice is garbage collected even if it contains values. -- 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]. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/7dfb2f75-af74-4a7d-ad50-1597f6e5aa7bn%40googlegroups.com.
