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

Avoid memory leak in String.cString() #22

Merged
merged 1 commit into from
Oct 13, 2016
Merged

Avoid memory leak in String.cString() #22

merged 1 commit into from
Oct 13, 2016

Conversation

djones6
Copy link
Member

@djones6 djones6 commented Oct 11, 2016

The function String.cString(using: Encoding) appears to be the cause of a memory leak with the changes in issue_788.

It would appear that the storage allocated by this function is never freed. It looks like there is some code there which deliberately extends the lifetime of the storage there (but I don't understand the code or the motivation).

I tried replacing this with some code replicating what we do in RouterResponse. This doesn't leak and performs similar.

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