Freeing memory

Siegfried Gonzi siegfried.gonzi at kfunigraz.ac.at
Thu Apr 25 10:12:14 EDT 2002


Steve Holden wrote:

> Python is usually a reliable consumer of memory, and a reliable collector of
> garbage (although a few pathological cases have been observed). You are
> seeing the behavior you describe because the interpreter is somehow
> retaining pointers to the data structures created during your simulations.
> Without a bit more information about the program structure and your usage
> it's difficult to say what might really be causing your problem.

a) Honestly speaking: I have programmed without any clear structure (the
simulation is more an ad hoc solution, it even includes an external mie
calculation program (written in C) and it uses also some satellite
binary datas): I make heavy use of returning lists with multiple
members: [[122.23,344.9,...],[2.23,4455.34,455.56,...]]. I also use
Numeric but it is not uncommon that not every problem can be solved with
slices alone.

But remark a) is not the problem:

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.

After 4 simulations it comes to a crash.


S. Gonzi



More information about the Python-list mailing list