I'm plotting some large plots in IPython QtConsole (and Notebook). These take up a lot of memory, but once they are plotted I don't need them any more and they can go.
How can I free up memory?
None of the following works:
close()
clf()
cla()
%reset
The only thing that frees the memory is restarting the kernel, which I don't always want to do (say I worked through a long process to get to a specific point) [To be precise, %reset
does free up some memory, but not as much as restarting the kernel].
How to replicate the problem:
plot(arange(2e7))
You may need a bigger or a smaller number to notice a big impact on your system memory.