Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAULT-4240 time.After() in a select statement can lead to memory leak #14814

Merged
merged 2 commits into from Apr 1, 2022

Conversation

hghaf099
Copy link
Contributor

@hghaf099 hghaf099 commented Mar 31, 2022

The time.After call in the for - select statement can lead to a memory leak because the garbage collector does not cleanup the underlying Timer object until the timer fires. A new timer is initialized at each iteration of the for loop (and hence select), which requires resources. So, many routines originating from the time.After call could lead to overconsumption of the memory.

@vercel vercel bot temporarily deployed to Preview – vault March 31, 2022 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook March 31, 2022 22:28 Inactive
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.

None yet

3 participants