[IPython-dev] memory leak?
Fernando Perez
Fernando.Perez at colorado.edu
Mon Apr 10 03:43:40 EDT 2006
Fernando Perez wrote:
> Ville Vainio wrote:
>
>>On 4/8/06, Hans Meine <hans_meine at gmx.net> wrote:
>>
>>
>>
>>>Sth. like the following would be great:
>>>
>>>%clearout - clear whole cache
>>>%clearout 112 - clear one line
>>>%clearout :100 140:150 113 - clear multiple (sub)ranges
>>
>>
>>I'll take a look at this over the next week, I have winter holiday so
>>I should have plenty of time & energy to play with stuff like this.
>
>
> Yes, something like this would be nice to have. Note that the cache object
> already has some basic flushing capabilities:
>
> __IP.outputcache.flush??
>
> which would be good to reuse/extend/cleanup.
>
> In the meantime, the OP can use at least
>
> __IP.outputcache.flush()
>
> for a full flush of the output cache (if not a line-targetted one).
I should have added that a
gc.collect()
would probably be a good idea to have at the end of that flush() method. I
also noticed that the Out[] object isn't really correctly flushed, only the
_NN variables are deleted (that code was probably written before Out[] existed
as a proper cache). Just some pointers...
Cheers,
f
More information about the IPython-dev
mailing list