Skip to content

Instantly share code, notes, and snippets.

@zonca
Created March 23, 2011 23:59
Show Gist options
  • Save zonca/884298 to your computer and use it in GitHub Desktop.
Save zonca/884298 to your computer and use it in GitHub Desktop.
memory leakage in pyfits.new_table
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])
@zonca
Copy link
Author

zonca commented Mar 28, 2011

FIXED March 28th 2011,
ticket:

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