The documentation indicates the time.Tick
leaks ('be aware that without a way to shut it down the underlying Ticker cannot be recovered by the garbage collector; it "leaks"'). I'm assuming this refers to the channel. However, there appears to be no way to cleanup a Timer
, either: You can make sure it doesn't fire but you can't close the channel (receive only).
The code for it doesn't contain a close
call. runtime.deltimer (which is the underlying mechanism for Stop
) doesn't touch the channel either.
No matter what, does Timer
always leak?