Freeing memory
Jeremy Bowers
newsfroups at jerf.org
Thu Apr 25 12:20:31 EDT 2002
Siegfried Gonzi wrote:
> I just start the script from the idle editor: 'Run script'.
>
> I even tried to use del(list1), del(list2),... but it won't help. I also
> write the results to a file (and not to the output screen) in order not
> to interference the calculation.
You may have some cyclic references in your dataset. What version of
Python are you using?
IDLE always has the same Python interpreter instance. If you can run the
script with no parameters like that, I'd re-recommend running directly
from a command line or from a double-click on some script file (as Steve
Holden did). Then there's no chance that Python will hold the memory
after execution (or the OS wouldn't be doing it's job).
The alternative is to figure out what's going on and make careful use of
weak references and more careful memory handling; just making sure to
run in a seperate instance should be enough.
More information about the Python-list
mailing list