此处是时间包中time.Timer
的文档。
它说Timer.Stop()
不会关闭其内置频道。
Timer.C
是只读的,因此无法手动关闭它?
问题是如果Timer不自己关闭它,谁会关闭?
通道没有关闭且没有可变点会导致内存泄漏吗?
// Stop prevents the Timer from firing.
// Stop does not close the channel, to prevent a read from the channel succeeding incorrectly.
func (t *Timer) Stop() bool {
}