Re: RFC: Reference counts on Gtk2::Tooltips



On Mon, May 05, 2003 at 03:46:43PM -0400, muppet wrote:
well, there's not really a way to leak the tooltips reference in perl, because
the wrapper will clean up the object when the time comes.  in C, this object
is leaked simply by virtue of not calling _unref on it.

When does the time come?

all you really have to do is keep the perl scalar around, either by adding it
to a hash or setting it as the user_data of some GObject.  having said that,
i've been writing code around this today and the bookkeeping gets a little
obnoxious.

I'm confused, but maybe I'm just thinking of the terms differently.
If you put the tooltip in a global variable (or inside some global
data structure) and then forget about it, that's a leak to me.
That's probably what most Perl programmers will do when they
discover that it works around the problem.

Andrew



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