RE: signals versus vfuncs



> another point of contention: GtkTreeIters are designed to be 
> used by allocation on the stack, and as such, have no 
> destructors.  the boxed free function is just g_free().  this 
> means i have no hook on iter destruction, which means that if 
> i want to store a perl scalar inside (which makes the iter 
> useful in model implementations), i have to leak that 
> structure in order for it to live long enough to be useful.  
> (without going into the gory details, it has to do with 
> garbage collection and scalar lifetimes.  we're looking into 
> workarounds, but so far they are perverse and unnatural.)  
> this is not good, of course.
> 
> is there any way at all to get notification when an iter is 
> no longer in use? 
> perhaps there's something simple i'm missing...

I've never done this, but, looking at the header, maybe the ref_node and
unref_node vfuncs have something to do with it.

Murray Cumming
www.murrayc.com
murrayc usa net



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