[pygtk] gpointer data on callback

D-Man dsh8290@rit.edu
Wed, 27 Sep 2000 01:12:49 -0400

What if Python switched to gc instead of ref counting?

I have heard of a good gc freely available for C/C++ written by Hans Boehm. 
>From what I've read it works about as good as the malloc/free implementations, but
without the developer's headaches with memory leaks.  

The intire interpreter, not just the python code, could use the collector to
make memory management easier.  Then you wouldn't have these problems with the
callbacks and the ref count.


On Wed, 27 Sep 2000 00:54:21 James Henstridge wrote:
> On Tue, 26 Sep 2000, Hilaire Fernandes wrote:
> > Hi,
> > 
> > I wish that in futur vesion of PyGnome it will be possible to pass
> > user data in the ok_cancel, question, request_string methods of the
> > GnomeApp object, it's a very elegant way of passing user data to the
> > callback and a miss feature in the actual binding.
> Those particular functions are very evil, and not designed for
> bindings.  They don't provide any way of getting notified when the
> callback should be destroyed.  As it is, every call to one of these
> functions adds an extra reference to the function.  If we were going to
> allow passing in user data, that would also get referenced, and hence
> never destroyed.  I am a bit weary of putting more effort into the
> bindings for these functions.
> > 
> > Keep the good work.
> > 
> > Hilaire Fernandes
> James.
> -- 
> Email: james@daa.com.au
> WWW:   http://www.daa.com.au/~james/
> _______________________________________________
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk