[Twisted-Python] help with refcounts and memleaks
moe at divmod.com
Mon Dec 26 19:39:30 EST 2005
On Tue, 27 Dec 2005 01:18:33 +0100, Andrea Arcangeli <andrea at cpushare.com> wrote:
>But then while trying to debug the 50M leak in the client at every
>server restart (so very visible), I quickly into this:
>a = thing()
>b = thing()
>a.other = b
>b.other = a
>Code like above is very common in my twisted based server. Note that
>there's no __del__ method in the class "thing". So what you say seems in
>disagreement with the above url. Perhaps I got bitten by the common
>mistake "I found it on the internet so it must be true"...
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.
More information about the Twisted-Python