[IPython-dev] memory leak?

Jörgen Stenarson jorgen.stenarson at bostream.nu
Thu Apr 6 13:26:22 CDT 2006


hi,

lately I have been using ipython to %run scripts that create large 
numeric arrays (in my case say 1000x1000 complex numbers). The problem I 
see is that when I rerun the script its like all variables created in 
that file are not freed even though if they have not been accessed in a 
way that would put them in the In or Out cache. For instance %running a 
file containing

import Numeric
a=Numeric.zeros((1000,1000),"D")

repeatedly without any intervening commands will have memory usage go up 
with every invocation of %run. But using execfile from an ordinary 
python prompt on the same file this is not the case. Is this a known 
problem (I'm on windows)? If it is, is there some way to manually free 
this memory?

/Jörgen




More information about the IPython-dev mailing list