aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-session.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-06-03 00:12:26 +0800
committerChris Lahey <clahey@src.gnome.org>2000-06-03 00:12:26 +0800
commit8d6afbe9102a979e28c861e3e4d34900cadd2eae (patch)
tree03d3c424f0cce1a7a965d05e707af6b773cc2c18 /camel/camel-session.c
parentac5683a1daaec4bf129ba1f59d80d8ea496efaab (diff)
downloadgsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.tar
gsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.tar.gz
gsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.tar.bz2
gsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.tar.lz
gsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.tar.xz
gsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.tar.zst
gsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.zip
Ref and unref objects in the service cache properly.
2000-06-02 Christopher James Lahey <clahey@helixcode.com> * camel-session.c: Ref and unref objects in the service cache properly. * camel-store.c: Ref the folder when returning it using lookup_folder. Used the folder's full name for the key for the folder cache since that's used to uncache it. svn path=/trunk/; revision=3388
Diffstat (limited to 'camel/camel-session.c')
-rw-r--r--camel/camel-session.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 17d7e60ee0..bc8393b7ef 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -26,6 +26,7 @@
*/
#include <config.h>
+#include <stdio.h>
#include "camel-session.h"
#include "camel-store.h"
#include "camel-transport.h"
@@ -191,6 +192,7 @@ camel_session_list_providers (CamelSession *session, gboolean load)
static void
service_cache_remove(CamelService *service, CamelSession *session)
{
+ gtk_object_unref(GTK_OBJECT(service));
g_hash_table_remove(session->service_cache, service->url);
}
@@ -247,6 +249,7 @@ camel_session_get_service (CamelSession *session, const char *url_string,
service = camel_service_new (provider->object_types[type], session, url, ex);
if (service) {
g_hash_table_insert(session->service_cache, url, service);
+ gtk_object_ref(GTK_OBJECT(service));
gtk_signal_connect((GtkObject *)service, "destroy", service_cache_remove, session);
}
return service;