memory leakage in pyfits.new_table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import objgraph | |
import pyfits | |
import gc | |
import numpy as np | |
print("Create table") | |
#a=pyfits.Column(name='',format='K',array=[1,2,3]) # Column instead correctly frees up memory | |
a=pyfits.new_table([pyfits.Column(name='',format='K',array=[1,2,3])]) | |
print("Delete table") | |
del a | |
print("Garbage collect") | |
gc.collect() | |
gc.collect() | |
gc.collect() | |
print("Still there") | |
print(objgraph.by_type('recarray')[0]) |
FIXED March 28th 2011,
ticket:
- http://trac6.assembla.com/pyfits/ticket/49
fixed in this changeset: - http://trac6.assembla.com/pyfits/changeset/844
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output:
Create table
Delete table
Garbage collect
Still there
[(1L,) (2L,) (3L,)]