[Twisted-Python] help with refcounts and memleaks

Bob Ippolito bob at redivi.com
Mon Dec 26 20:22:24 EST 2005


On Dec 26, 2005, at 8:02 PM, Andrea Arcangeli wrote:

> On Tue, Dec 27, 2005 at 01:18:33AM +0100, Andrea Arcangeli wrote:
>> So, I'll backout all my latest changes, and I'll try to find the real
>
> Now after understanding the __del__ heisenbug in my testcases, and a
> 1000 lines backout (dropping all weakrefs and hacks I did to try to
> remove those pratical memleaks) here my findings on the real life
> reconnectingclientfactory memleak that made me look into this in the
> first place: It wasn't a memleak in theory, it was only in practice...
> gc.collect() seems not invoked frequently enough.

Take a look at:
http://docs.python.org/lib/module-gc.html

You can adjust the threshold for each GC generation to suit your  
application better.

-bob





More information about the Twisted-Python mailing list