[pygtk] PyGObject leaking?
Tony Nelson
tonynelson at georgeanelson.com
Fri Apr 13 00:23:28 WST 2007
At 10:19 AM -0400 4/12/07, John Ehresman wrote:
>Tony Nelson wrote:
>> I say again: Python will collect objects as soon as they become
>> unreferenced. Immediately. It has /nothing/ to do with Garbage
>> Collection. It is Reference Counting, and it is the standard way that
>> Python has always reclaimed unused objects, even before there was Cyclic GC.
>
>You're correct that CPython uses reference counting and disposes of
>objects when the count goes to 0. However when a object is part of a
>cycle, the count won't go to 0 until the cyclic gc runs. Every python
>wrapper for a GObject derived instance is part of a cycle, so these
>objects are not disposed of until the gc runs.
Doesn't make it any less a bug, even if it is a very hard bug. I've
glanced over http://bugzilla.gnome.org/show_bug.cgi?id=320428. ISTM the
bug is from trying to joing two objects together as one. I haven't looked
at the code (and the patches by themselves aren't making sense), but could
the two objects actually become one hybrid object, possibly a proxy
forwarding object that simply owns the two real objects? Obviously I don't
understand how such a state comes to be, where there must have been two
objects created independently that represent a single object.
--
____________________________________________________________________
TonyN.:' <mailto:tonynelson at georgeanelson.com>
' <http://www.georgeanelson.com/>
More information about the pygtk
mailing list