Skip to content

loadtxt() leaks memory (uncollectible gzip object) (Trac #1356) #1954

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

Closed
thouis opened this issue Oct 19, 2012 · 5 comments
Closed

loadtxt() leaks memory (uncollectible gzip object) (Trac #1356) #1954

thouis opened this issue Oct 19, 2012 · 5 comments

Comments

@thouis
Copy link
Contributor

thouis commented Oct 19, 2012

Original ticket http://projects.scipy.org/numpy/ticket/1356 on 2010-01-10 by trac user maxy, assigned to unknown.

loadtxt() leaves objects behind that the python garbage collector can't clean up. Probably not a big issue, but very annoying when hunting other memory leaks.

In [1]: from numpy import *
In [2]: import gc
In [3]: gc.collect(); gc.garbage
Out[3]: 12
Out[3]: []
In [4]: data = loadtxt('painting30sec.dat.gz')
In [5]: gc.collect(); gc.garbage
Out[5]: 10
Out[5]: [<gzip on 0x7f81c8578d88>]
In [6]: data = loadtxt('painting30sec.dat.gz')
In [7]: gc.collect(); gc.garbage
Out[7]: 10
Out[7]: [<gzip on 0x7f81c8578d88>, <gzip on 0x7f81c8583320>]

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

Milestone changed to 1.5.1 by @pv on 2010-10-10

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

trac user fpedregosa wrote on 2010-11-17

Proposed fix as pull request here:

#15

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

trac user fpedregosa wrote on 2010-12-05

Pull request accepted. This can be closed.

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

Milestone changed to NumPy 2.0 by @pv on 2010-12-05

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

Milestone changed to 1.6.0 by @mwiebe on 2011-05-21

@thouis thouis closed this as completed Oct 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant