Re: GtkTreeStore and row deletion
- From: Pierre Wieser <pwieser trychlos org>
- To: David NeÄas <yeti physics muni cz>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkTreeStore and row deletion
- Date: Wed, 2 Sep 2009 15:44:35 +0200 (CEST)
----- "David NeÄas" <yeti physics muni cz> a Ãcrit :
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
Oop's!
From gtk_tree_store_set(): "The value will be copied or referenced
by the store if appropriate". I may have missed this !
I will check this this evening, by counting instance_init() and
instance_dispose() respective occurences.
Thanks a lot for your explanations.
Regards
Pierre
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]