script uses up all memory

Chris Angelico rosuav at
Thu Mar 6 23:28:42 CET 2014

On Fri, Mar 7, 2014 at 9:21 AM, Larry Martell <larry.martell at> wrote:
> First I added del( before the Django call. That did not
> stop the memory consumption. Then I added a call to gc.collect() after
> the del and that did solve it. gc.collect() returns 0 each time, so
> I'm going to declare victory and move on. No time to dig into the
> Django code. Thanks.

Not all problems need to be solved perfectly :) But at very least, I
would put a comment against your collect() call explaining what
happens: that is involved in a refloop. Most Python code
shouldn't have to call gc.collect(), so it's worth explaining why you
are here.


More information about the Python-list mailing list