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

BF: memleaks with typed memory views in Cython #743

Merged
merged 1 commit into from Oct 20, 2015

Conversation

MarcCote
Copy link
Contributor

Refcount is not decreased when converting a numpy array, previously defined in Python space (i.e. not in the .pyx file), into a Cython typed memory view.

The workaround is to create a copy of the numpy array using astype while in Cython space. Luckily for us, most of the time no data is copied, only metadata (i.e. when the dtype stays the same).

Fixes #737

@Garyfallidis
Copy link
Contributor

Thx! Cool debugging and thank you for discovering another cython bug! I hope your reported this. You have some minor pep8 issues on your tests. Fix them in another PR please. Not crucial for now. Thx much!

Garyfallidis added a commit that referenced this pull request Oct 20, 2015
BF: memleaks with typed memory views in Cython
@Garyfallidis Garyfallidis merged commit 6acec2d into dipy:master Oct 20, 2015
@MarcCote
Copy link
Contributor Author

Yes, I made a post explaining the problem and attached some code to reproduce the bug. Last time I did this they confirmed the bug and opened a issue in their bug tracker pretty quickly. However, as of now, it is still not fixed :(

@MarcCote MarcCote deleted the bf_resampling_memleak branch October 21, 2015 13:58
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