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 in string construction #8

Open
pjb7687 opened this issue Oct 19, 2016 · 1 comment
Open

Memory leak in string construction #8

pjb7687 opened this issue Oct 19, 2016 · 1 comment

Comments

@pjb7687
Copy link

pjb7687 commented Oct 19, 2016

Hello,

I am inspired by your code and currently developing a cffi-based pysam alternative which works with Pypy. While testing your code I found that

ffi.new('kstring_t *', {'m': 0, 'l': 0, 's': ffi.NULL})

causes memory leak, so I replaced it with Pythonic way. You can find the change here:

HiDiHlabs@cd35d6f

Maybe there would be better way to do this? Thank you so much for your contribution!

Best regards,
Jeongbin Park

@brentp
Copy link
Owner

brentp commented Oct 19, 2016

Thanks for reporting.
I didn't know about the memory leak. I think the better solution is to just free kstr.s

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

No branches or pull requests

2 participants