[Xfce4-commits] [apps/xfdashboard] 02/05: Add debug messages about which images are still in cache and not released to XfdashboardImageContent

noreply at xfce.org noreply at xfce.org
Thu Mar 16 11:09:22 CET 2017


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit 21a3debbac28adb39dc4fa7317a79c7dcbb4a59f
Author: Stephan Haller <nomad at froevel.de>
Date:   Thu Mar 16 08:54:30 2017 +0100

    Add debug messages about which images are still in cache and not released to XfdashboardImageContent
---
 libxfdashboard/image-content.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/libxfdashboard/image-content.c b/libxfdashboard/image-content.c
index 0121f0c..5a4ecca 100644
--- a/libxfdashboard/image-content.c
+++ b/libxfdashboard/image-content.c
@@ -158,6 +158,26 @@ static void _xfdashboard_image_content_destroy_cache(void)
 	/* Destroy cache hashtable */
 	cacheSize=g_hash_table_size(_xfdashboard_image_content_cache);
 	if(cacheSize>0) g_warning(_("Destroying image cache still containing %d images."), cacheSize);
+#ifdef DEBUG
+	if(cacheSize>0)
+	{
+		GHashTableIter						iter;
+		gpointer							hashKey, hashValue;
+		const gchar							*key;
+		XfdashboardImageContent				*content;
+
+		g_hash_table_iter_init(&iter, _xfdashboard_image_content_cache);
+		while(g_hash_table_iter_next (&iter, &hashKey, &hashValue))
+		{
+			key=(const gchar*)hashKey;
+			content=XFDASHBOARD_IMAGE_CONTENT(hashValue);
+			g_print("Image content in cache: Item %s@%p for key '%s' (used by %d actors)\n",
+						G_OBJECT_TYPE_NAME(content), content,
+						key,
+						g_list_length(content->priv->actors));
+		}
+	}
+#endif
 
 	g_debug("Destroying image cache hashtable");
 	g_hash_table_destroy(_xfdashboard_image_content_cache);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list