After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 96851 - [PATCH] sortmodel leaking references on child model
[PATCH] sortmodel leaking references on child model
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.1.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks: 90477
 
 
Reported: 2002-10-26 01:04 UTC by Jorn Baayen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.19 KB, patch)
2002-10-26 01:05 UTC, Jorn Baayen
none Details | Review

Description Jorn Baayen 2002-10-26 01:04:36 UTC
When setting the child model, GtkTreeModelSort refs the child model twice,
and only unrefs it once when unsetting.

Attached patch fixes the problem.
Comment 1 Jorn Baayen 2002-10-26 01:05:13 UTC
Created attachment 11840 [details] [review]
patch
Comment 2 Kristian Rietveld 2002-11-02 22:37:10 UTC
Attached patch is wrong, because things will segfault in the following
situation:
m = gtk_list_store_new ();
n = gtk_tree_model_sort_new_with_model (m);
g_object_unref (m);
gtk_tree_model_sort_set_model (n, m);

If you remove the second ref call, then things will be fine, so that
fix got in.