Skip to content

fix(eventstream): move ContinuationCallbackData into ClientContinuation to fix memory leak #436

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

Merged
merged 1 commit into from
May 24, 2022

Conversation

MikeDombo
Copy link
Contributor

Issue #, if available:

Description of changes:
Fixes a memory leak in event stream due to ContinuationCallbackData being held by the actual connection and only destroyed on connection shutdown. This means that every single request will cause a leak of ~127 bytes which won't be cleaned until the whole connection dies. This change removes the vector of callback data from the connection and instead stores the continuation callback data with the actual continuation which created it. It is then destroyed in the continuation's destructor.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@MikeDombo MikeDombo force-pushed the event-stream-leak branch from 78b85a0 to d5d58e5 Compare May 24, 2022 20:00
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.

2 participants