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

Fix memory leak in ArrayList #316

Merged
merged 1 commit into from
Dec 28, 2018
Merged

Fix memory leak in ArrayList #316

merged 1 commit into from
Dec 28, 2018

Conversation

kngwyu
Copy link
Member

@kngwyu kngwyu commented Dec 26, 2018

To make algorithm clear, I designed pythonrun::array_list::ArrayList to always have minimum capacity to hold pointers.
But I found a bug. In current implementation, when arraylist's length becomes 0 from 1, excess capacity remains and causes memory leak.
It's my mistake, sorry 😓
@konstin
This is a serious bug so could you please release 0.5.3 with this PR?

kngwyu added a commit to kngwyu/pyo3 that referenced this pull request Dec 27, 2018
kngwyu added a commit that referenced this pull request Dec 27, 2018
@kngwyu
Copy link
Member Author

kngwyu commented Dec 27, 2018

I also pushed this commit to https://github.com/PyO3/pyo3/tree/0_5_backports.

@konstin
Copy link
Member

konstin commented Dec 28, 2018

Thank you for fixing and backporting this! Unfortunately releasing is blocked on rust-lang/rust#57176, but I'll publish once that is fixed.

@konstin konstin merged commit 3225941 into PyO3:master Dec 28, 2018
@konstin
Copy link
Member

konstin commented Jan 4, 2019

I've published 0.5.3 :)

@kngwyu
Copy link
Member Author

kngwyu commented Jan 4, 2019

Thanks!

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