[gtk] textview: clear cached entries before releasing containers
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] textview: clear cached entries before releasing containers
- Date: Fri, 9 Aug 2019 19:52:28 +0000 (UTC)
commit 4ae362d1382588c1519b2e6cac1edc79294e8fb5
Author: Christian Hergert <chergert redhat com>
Date: Fri Aug 9 12:52:16 2019 -0700
textview: clear cached entries before releasing containers
We want to ensure all of the display cache entries are released in the
normal fashion before releasing the structures so that we can maintain
the invariant that cache_iter will always exist while in the cache.
gtk/gtktextlinedisplaycache.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtktextlinedisplaycache.c b/gtk/gtktextlinedisplaycache.c
index 6129d787fc..267d9f6182 100644
--- a/gtk/gtktextlinedisplaycache.c
+++ b/gtk/gtktextlinedisplaycache.c
@@ -93,6 +93,8 @@ gtk_text_line_display_cache_free (GtkTextLineDisplayCache *cache)
g_clear_handle_id (&cache->log_source, g_source_remove);
#endif
+ gtk_text_line_display_cache_invalidate (cache);
+
g_clear_pointer (&cache->evict_source, g_source_destroy);
g_clear_pointer (&cache->sorted_by_line, g_sequence_free);
g_clear_pointer (&cache->line_to_display, g_hash_table_unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]