]> Pileus Git - ~andy/gtk/commit
treemodelfilter: Introduce notion of external ref count
authorKristian Rietveld <kris@gtk.org>
Sun, 26 Jun 2011 20:04:05 +0000 (22:04 +0200)
committerKristian Rietveld <kris@gtk.org>
Mon, 22 Aug 2011 19:30:32 +0000 (21:30 +0200)
commitdc15124c6f3596599de753a297a8d8d355da3294
tree926a2ad815af45f35d8341b0dfaa039c96046e02
parent058a9090c2960db6781161cdfca649c9677e25a4
treemodelfilter: Introduce notion of external ref count

We need to distinguish between the ref count objects have on us versus
the ref count we have on our child model.  To keep track of the former,
we introduce the "external ref count" in this commit.  The zero_ref_count
needs to be determined from the external ref count, because objects that
have a ref count on us have say in which levels must be cached and which
can be released.

Before the caching in GtkTreeModelFilter was essentially broken and
levels were never released.  This was caused because the zero_ref_count
was connected to the ref count the filter model had on its child model.
Now that this depends on the external ref count, this is working fine and
as to be expected.
gtk/gtktreemodelfilter.c