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

Memory leak from address pointer allocation #55

Merged
merged 1 commit into from Mar 1, 2017

Conversation

OhItsShaun
Copy link

@OhItsShaun OhItsShaun commented Mar 1, 2017

Description

Memory leak of addrinfo allocation present every time UnsafeMutablePointer<addrinfo>.allocate(capacity: 1) is called. Every call leaks an additional 48 bytes.

Motivation and Context

getaddrinfo() handles memory allocation to the pointer which is released upon freeaddrinfo() however the original allocation from .allocate(capacity:) is unallocated and leaked (ARC is not responsible for deallocation of pointers).

Leak is present when run through Xcode Instruments. With pull changes, Instruments no longer reports leak.

Checklist:

@billabt billabt merged commit 32c2dd8 into Kitura:master Mar 1, 2017
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

2 participants