Don't ref the services in the cache.

2000-06-02  Christopher James Lahey  <clahey@helixcode.com>

	* camel-session.c: Don't ref the services in the cache.

svn path=/trunk/; revision=3396
This commit is contained in:
Christopher James Lahey
2000-06-02 19:15:22 +00:00
committed by Chris Lahey
parent 01bb498fbb
commit fd1304e14f
2 changed files with 4 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2000-06-02 Christopher James Lahey <clahey@helixcode.com>
* camel-session.c: Don't ref the services in the cache.
2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c: Rearanged where debug

View File

@ -47,18 +47,11 @@ camel_session_init (CamelSession *session)
g_hash_table_new (camel_url_hash, camel_url_equal);
}
static void
hash_unref_service(void *key, void *value, void *data)
{
gtk_object_unref((GtkObject *)value);
}
static void
camel_session_finalise(GtkObject *o)
{
CamelSession *session = (CamelSession *)o;
g_hash_table_foreach(session->service_cache, hash_unref_service, 0);
g_hash_table_destroy(session->service_cache);
g_hash_table_destroy(session->providers);
@ -192,7 +185,6 @@ 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);
}
@ -249,7 +241,6 @@ 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;