You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of Go 1.23, garbage collection of time.After() has improved, as per go1.23 doc time.After.
package time // import "time"
func After(d Duration) <-chan Time
After waits for the duration to elapse and then sends the current time on
the returned channel. It is equivalent to NewTimer(d).C.
Before Go 1.23, this documentation warned that the underlying Timer
would not be recovered by the garbage collector until the timer fired,
and that if efficiency was a concern, code should use NewTimer instead and
call Timer.Stop if the timer is no longer needed. As of Go 1.23, the garbage
collector can recover unreferenced, unstopped timers. There is no reason to
prefer NewTimer when After will do.
The text was updated successfully, but these errors were encountered:
As of Go 1.23, garbage collection of
time.After()
has improved, as pergo1.23 doc time.After
.The text was updated successfully, but these errors were encountered: