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

🐛 fix memory leak caused by gin context pooling. #710

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Jul 5, 2024

The gin HTTP request handler uses a gin.Context pool. The RichContext contains the response body which is passed to the Render middle-ware.
We need to remove the rich context to prevent holding on to memory while the context is in the pool.

WithContext renamed to RichContext for clarity.

Copy link
Collaborator

@mansam mansam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants