[nautilus] Better debugging for NautilusDirectory leaks
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Better debugging for NautilusDirectory leaks
- Date: Fri, 25 Mar 2011 15:43:34 +0000 (UTC)
commit 695efe7cb3f9a96e7c870c36d30e2759d800d2d5
Author: Alexander Larsson <alexl redhat com>
Date: Fri Mar 25 14:39:07 2011 +0100
Better debugging for NautilusDirectory leaks
libnautilus-private/nautilus-directory.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-directory.c b/libnautilus-private/nautilus-directory.c
index 9142a8c..af7f401 100644
--- a/libnautilus-private/nautilus-directory.c
+++ b/libnautilus-private/nautilus-directory.c
@@ -331,6 +331,16 @@ add_preferences_callbacks (void)
NULL);
}
+static void
+print_key_directory (gpointer key, gpointer value, gpointer callback_data)
+{
+ char *uri;
+
+ uri = g_file_get_uri (G_FILE (key));
+ g_print ("--> %s\n", uri);
+ g_free (uri);
+}
+
/**
* nautilus_directory_get_by_uri:
* @uri: URI of directory to get.
@@ -348,7 +358,7 @@ nautilus_directory_get_internal (GFile *location, gboolean create)
/* Create the hash table first time through. */
if (directories == NULL) {
directories = eel_g_hash_table_new_free_at_exit
- (g_file_hash, (GCompareFunc)g_file_equal, NULL,
+ (g_file_hash, (GCompareFunc)g_file_equal, print_key_directory,
"nautilus-directory.c: directories");
add_preferences_callbacks ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]