Re: GtkTreeStore and row deletion



On Wed, Sep 02, 2009 at 02:56:12PM +0200, pwieser trychlos org wrote:
----- "Kristian Rietveld" <kris gtk org> a Ãcrit :

I don't fully get the problem you are describing.  If I understand it
correctly, you have a tree model where each node points to a GObject.
Isn't it the case that when a row is destroyed that contains a
G_TYPE_OBJECT column, this will unref the value in that column?

Are you affirmative about that ?

Definitely.

It would be great in this case, but appears as undocumented. Or, is it ?
However, in the previous version, when I unreffed the object from my
GSList, I don't have observed that same object be (silently) unreffed
a second time when the row was deleted. I think Gtk would have warned
me in this case...

Maybe you forgot to release new references from gtk_tree_model_get() (it
produces copies, i.e. if you get an object you get a new reference;
similarly, if you get a string you get a newly allocated copy).

Yeti




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