[Twisted-Python] help with refcounts and memleaks

Andrea Arcangeli andrea at cpushare.com
Mon Dec 26 20:09:46 EST 2005

On Tue, Dec 27, 2005 at 02:39:30AM +0200, Moe Aboulkheir wrote:
> the document at that URL is six years old, and so dates from a time when 
> python's garbage collector couldn't properly deal with plain cyclical 
> references, AFAICT.

cool, thanks for confirming this. I admit I didn't pay attention to the
date before reading your replies here... also because I could reproduce
the problem here due the __del__ heisenbug in my testcases.

I'm just sending an email to the owner of the obsolete info, that page
scored at the top of my google search for python memleaks and it created
me lots of unnecessary confusion ;). But after all it's good because now
I learnt about the __del__ effect on the gc. Sorry for the noise.

The only remaining thing to understand is why by default the collect()
method is never invoked and I've to invoke it explicitly to avoid a
gigantic leak (see my previous email with the fix for my
reconnectingclientfactory pratical memleak that made me look into this).

More information about the Twisted-Python mailing list