Re: GSourceFuncs.finalize?

On Tue, 2004-04-13 at 19:35, Alan M. Evans wrote:
> When does the finalize function in GSourceFuncs get called? The online
> docs say, "Called when the source is finalized" but never, as best I can
> tell, describes when that is or even what it means to be "finalized."

"Finalize" is a sense of "destroy", but not the same thing.  It's what
happens at the end of the object's lifetime, as opposed to destroy,
which typically begins that process.  For example, GObject has a
finalize vfunc which gets called right before the actual instance is

In the case of a GSource, the finalize func is invoked from
g_source_unref_internal() if the refcount of the object reaches zero --
just before freeing the memory associated with it.  It is required that
the source has been removed from its context at that point.

muppet <scott at asofyet dot org>

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