diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-08-04 13:33:06 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-08-04 13:33:06 +0100 |
commit | 5ba9266a7798e03013af14d4e5003725151e665e (patch) | |
tree | 5a48eccde54cdf5bf3ca0464b7b26b2a175559c8 /src | |
parent | 9cf6aa224e626832f2b4c1e4e53d5fd604484396 (diff) | |
download | ayatana-indicator-session-5ba9266a7798e03013af14d4e5003725151e665e.tar.gz ayatana-indicator-session-5ba9266a7798e03013af14d4e5003725151e665e.tar.bz2 ayatana-indicator-session-5ba9266a7798e03013af14d4e5003725151e665e.zip |
destroying hash tables in finalize
Diffstat (limited to 'src')
-rw-r--r-- | src/udev-mgr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/udev-mgr.c b/src/udev-mgr.c index 6749157..df491aa 100644 --- a/src/udev-mgr.c +++ b/src/udev-mgr.c @@ -76,7 +76,6 @@ udev_mgr_init (UdevMgr* self) self->supported_usb_scanners = NULL; self->scanners_present = NULL; self->webcams_present = NULL; - g_debug ("About to create hash tables"); self->client = g_udev_client_new (subsystems); self->supported_usb_scanners = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -94,7 +93,6 @@ udev_mgr_init (UdevMgr* self) g_str_equal, g_free, g_free); - g_debug ("After creating hash tables"); // load into memory all supported scanners ... populate_usb_scanners (self->supported_usb_scanners); @@ -108,7 +106,11 @@ udev_mgr_init (UdevMgr* self) static void udev_mgr_finalize (GObject *object) { - // TODO tidy up hashtables. + UdevMgr* self = UDEV_MGR (object); + g_hash_table_destroy (self->supported_scsi_scanners); + g_hash_table_destroy (self->supported_usb_scanners); + g_hash_table_destroy (self->scanners_present); + g_hash_table_destroy (self->webcams_present); G_OBJECT_CLASS (udev_mgr_parent_class)->finalize (object); } |