On Sat, Jan 11, 2003 at 12:03:27PM +0100, BRUGUIER Nicolas wrote:
> > Hmmm, the object should be referenced during the signal, the gobject signal
> > code does that.
> Ok no problem
>
> > But it should dereference it after the signal emission is
> > done.
>
> My problem is here when the signal emission is done I not have
> dereferencing
>
> now i do
>
> class MyObject
> {
> ....
>
> signal NONE(NONE)
> mysignal(self)
> {
> g_object_unref(self);
>
> }
>
> ....
> }
>
> bad hack, i known but it's work fine with gob 2.0.4 and glib 2.0.6
But there you lose a reference. The GObject core will do an unref
AFTER it emitted all signals. Doesn't your object get killed after
the signal emission is done?
I think I'm not understanding the problem at all correctly. Can you include
a .gob file (one that works, not just one with some '...') so that I can
compile and see exactly what is happening, and that demonstrates the problem
you are seeing?
In the code snippets you sent it SHOULD be correct to have refcount 2 INSIDE
the signal handler. After the signal emission the refcount should be back to
1.
George
-- George <jirka_at_5z.com> If I had my life to live over again, I'd be a plumber. -- Albert EinsteinReceived on Sun Jan 12 2003 - 14:18:56 CST
This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT