memory leak problem with arrays
Fredrik Lundh
fredrik at pythonware.com
Thu Jun 15 07:11:59 EDT 2006
<sonja.coussell at gmail.com> wrote:
> After doing this I see that iterative counters used to collect occurrences
> and nested loop counters (ii & jj) as seen in the code example below
> are the culprits with the worst ones over 1M:
>
> for ii in xrange(0,40):
> for jj in xrange(0,20):
> try:
> nc = y[a+ii,b+jj]
> except IndexError: nc = 0
>
> if nc == "1" or nc == "5":
> news = news +1
> if news == 100:
> break
> else:
> pass
> y[a+ii,b+jj] = 4
> else:
> pass
what's "y" in this example ?
</F>
More information about the Python-list
mailing list