Re: GtkGC shared auto-release



On Mon, 2008-01-14 at 23:51 -0500, muppet wrote:

Should we just add this DESTROY override to the bindings?  (Taking
care to retain compatibility with code that calls ->release
explicitly, of course.)

Yes, I think that would make sense.  The only approach I can think  
of is
actually the one Kevin implemented.  Attached is an adaptation of it.
The in-place wrapping of Gtk2::GC methods makes it look and feel  
rather
dirty.  Is there a better way?

Not sure if it's really better, but how about a more hermetically- 
sealed modification of the methods themselves?

Yes, that's much better.  I initially wanted to implement this in XS
too, but storing and modifying the release count inside the hash using
the XS API didn't appear pleasant.  For some reason, I didn't think of
qdata.

What about Kevin's suggestion of guarding against release_count == 0 in
the xsub for gtk_gc_release?  Otherwise, the patch looks fine to me.

-- 
Bye,
-Torsten




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]