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 1 commit into from Oct 20, 2015


None yet
2 participants

MarcCote commented Oct 19, 2015

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


This comment has been minimized.


Garyfallidis commented Oct 20, 2015

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

Merge pull request #743 from MarcCote/bf_resampling_memleak
BF: memleaks with typed memory views in Cython

@Garyfallidis Garyfallidis merged commit 6acec2d into nipy:master Oct 20, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.


MarcCote commented Oct 21, 2015

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 MarcCote:bf_resampling_memleak branch Oct 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment