Re: GtkTextTag ref_count problem



Jeff Franks <jcf tpg com au> writes: 
> which unreferences each tag in the table. At the start of this
> function a tag has a reference count of 2 and after being unreferenced
> it still has a reference count of 1. When you apply a tag the
> 'gtk_text_buffer_real_apply_tag()' function gets called. This calls
> '_gtk_text_btree_tag()" which inturn calls
> 'gtk_text_btree_get_tag_info()' which increases the reference count of
> a tag. Searching through the source code I couldn't find any where
> that the tag gets unreferenced again,

It's supposed to get unreferenced by gtk_text_btree_remove_tag_info(),
called from _gtk_text_btree_notify_will_remove_tag(), which is called
for gtk_text_tag_table_remove() but not gtk_text_tag_table_finalize().
So the tag table finalizer needs to handle this case.

Be sure it's in bugzilla, I'll need to do a pass through TextView bugs
for 2.0.1.

Havoc



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