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

Implement heap snapshot memorytracker for http types #1631

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Feb 7, 2024

No description provided.

@jasnell jasnell requested review from a team as code owners February 7, 2024 14:59
Comment on lines +1162 to +1164
KJ_IF_SOME(respondWithCalled, state.tryGet<RespondWithCalled>()) {
visitor.visit(respondWithCalled.promise);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this fix a memory leak?

Copy link
Member Author

Choose a reason for hiding this comment

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

It might. If the promise is left dangling and any closures attached to it happen to create a cycle then yes, it could have leaked. A big part of the reason I'm adding this memorytracker mechanism is to help find anything potentially like this.

@jasnell jasnell merged commit b2407fe into main Feb 7, 2024
11 checks passed
@jasnell jasnell deleted the jsnell/http-memory-tracker branch February 7, 2024 20:32
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