Re: gtk_object_unref
- From: Havoc Pennington <hp redhat com>
- To: "Jean-Christophe Berthon" <jean-christophe berthon cgey com>
- Cc: "Gtk List" <gtk-list gnome org>
- Subject: Re: gtk_object_unref
- Date: 02 Oct 2001 13:44:50 -0400
"Jean-Christophe Berthon" <jean-christophe berthon cgey com> writes:
> OK. I didn't really understand everything (esp. about the floating
> reference, I don't exactly what this thing mean or is...). But I've tryed to
> add to my code a gtk_object_sink just after the creation of the
> canvas item.
You shouldn't need to sink, just be sure you ref.
> Then I've tryed to add instead gtk_object_ref and gtk_object_sink.
That should be OK.
> And
> finally I've tryed gtk_object_ref only instead of the previous two
> commands.
Also should be OK.
> But in all this case I got the warnings.
Something else is wrong then.
> But I want to precise one thing.
> The unref operation occur in a callback of the canvas item. So one of them
> receive an action from the user and I have to unref this item and a second
> one (passed with the void* of the callback).
> The item that fired the event has a ref_count of 3 (instead I would expect
> 1)
The signal subsystem will temporarily add references while emitting a
signal on an object, that explains the refcount of 3.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]