Skip to content

Conversation

dimchansky
Copy link

The underlying Timer is not recovered by the garbage collector until the timer fires. It's better to use time.NewTimer instead and call its Stop method when the timer is no longer needed to avoid potential memory leak issues.

It's hard to run into a memory leak issue in 5 seconds, but it will potentially reduce memory pressure when there are many short-lived subscribers.

The underlying Timer is not recovered by the garbage collector until the timer fires.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant