Close(channel) is mandatory or just a good practice

I’m learning channel and see some codes that close channel while others not. So it appears to me that closing channel is a good practice but not mandatory. Am I right


The keyword is: close when is required. It’s not a mandatory to close a channel except when the receiver is expecting a close.

Unused channel, closed or open, like other data, will be garbage collected.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.