Re: Leak in Gtk2::SimpleList



Torsten Schoenfeld <kaffeetisch gmx de> writes:

This smells a lot like some circular reference issue,

I spot one at

          $r->signal_connect
            (edited => \&text_cell_edited, $view);

under $column_info[$i]{attr} eq 'text'.  Is that a hard ref from the
renderer back to its containing view?  I've had to make "edited" signals
like that with a weaken() back to its destination TreeView.  The one
under $column_info[$i]{attr} eq 'active' looks a bit similar.


I'd thought at one time of a debug option that could make signal handler
userdata visible to Devel::FindRefs to find such things.  It might be as
easy as callback makers like gperl_closure_new_with_marshaller() putting
a ref to their otherwise private dangling userdata scalar into a global
hash table (and removing it on signal disconnect) with a key string
describing where or what it's the userdata for.  If the table is global
enough FindRefs would see it in its normal search.  Of course you always
tend to get a lot of extraneous stuff too from FindRefs, but a global
might improve its "... which is not found anywhere I looked :(" leaf.





-- 
The sigfile lesser-known SI units series:
milliHelen - the amount of beauty required to launch a ship.
(A full Helen is the amount to launch 1000 ships, but so few
women have that much that it's too large for most uses.)



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