[Mailman-Developers] Re: Huge qrunner process

sigma@pair.com sigma@pair.com
Fri, 8 Dec 2000 06:16:10 -0500 (EST)


> Python uses reference-counting, so the mailinglist should go away as soon as
> all references to it go away. However:
> 
> python -i bin/withlist mailman-devel-test
> >>> import sys
> >>> sys.getrefcount(m)
> 12

I suspected as much :(

> There are 12 references to the mailinglist object. One is the argument
> passed to 'getrefcount', one is the local variable 'm', but the other 10 are
> unaccounted for. I think it's safe to say there's a reference cycle in there
> somewhere ;) The easiest way to fix this is probably to install Python 2.0
> with the garbage collector. It's a new feature, which tries to collect as
> much cyclic garbage as possible. If anything, it can help figure out where
> those cycles exist.

We are already running Python 2.0 on this machine :(  I suppose I could
litter the code with debugging statements and see how the reference count
goes up.

I don't see any kind of destroy-no-matter-what function for objects.

Thanks,
Kevin