[pygtk] gpointer data on callback
Wed, 27 Sep 2000 20:08:40 +0800 (WST)
On Wed, 27 Sep 2000, David Arnold wrote:
> -->"James" == James Henstridge <email@example.com> writes:
> James> On Wed, 27 Sep 2000, D-Man wrote:
> >> What if Python switched to gc instead of ref counting?
> James> There is almost no chance of adding another GC to the mix for
> James> pygtk. Both python and gtk do reference counted garbage
> James> collection. The objects in question are python objects, so
> James> are using reference counting already, and there is no way to
> James> change that.
> note that as of 2.0b1 (available now, 2.0 final scheduled for 10/10),
> the interpreter includes garbage collection (for Python objects).
> reference counting is still used, but cycles are (optionally)
> collected by the gc.
And this issue is not related to cyclic references. It is simply the case
that the functions in question give no means to know when the callback
object should be unref'd. Hence the leak. I have thought this problem
through. It would be much better to fix gnome-libs in this case (it may
have already been fixed in the 2.0 branch). In the meantime, I don't want
to encourage people to use those functions, as they will see leaks.