[gnome-db] GObject question



Hi!

I've got a question about the GObject's finalization methods.
I've realized to day that something is wrong with my code because I want
an object which is being free'd to be able to send signals. Here is what
happens:
- I call g_object_unref (object)
- the _finalize(object) methods gets called on the object and from this
method I want to send signals., so I call g_signal_emit()
- g_object_ref (object) is called by the GObject(s implementation but an
error appears:

GLib-GObject-CRITICAL **: file gobject.c: line 1292 (g_object_ref):
assertion `object->ref_count > 0' failed

Any idea how I could do the same without this error?
Do I have to override the "dispose" method and send signals from within
it?

Thanks,

Vivien



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