aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-08-11 18:59:17 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-11 18:59:17 +0800
commit33ffe9aadcef483a4900cc65fc9e840220951e3c (patch)
treedda45ce6ecb34bc2a2dc6a342dd526f95e072da6 /camel/camel-store.c
parent9d041c9464b7e13cce7368e644781971d9ad5501 (diff)
downloadgsoc2013-evolution-33ffe9aadcef483a4900cc65fc9e840220951e3c.tar
gsoc2013-evolution-33ffe9aadcef483a4900cc65fc9e840220951e3c.tar.gz
gsoc2013-evolution-33ffe9aadcef483a4900cc65fc9e840220951e3c.tar.bz2
gsoc2013-evolution-33ffe9aadcef483a4900cc65fc9e840220951e3c.tar.lz
gsoc2013-evolution-33ffe9aadcef483a4900cc65fc9e840220951e3c.tar.xz
gsoc2013-evolution-33ffe9aadcef483a4900cc65fc9e840220951e3c.tar.zst
gsoc2013-evolution-33ffe9aadcef483a4900cc65fc9e840220951e3c.zip
Message creation still consumes a lot of
memory (maybe 2000k) and I really don't understand why. As soon as I get gtk working on SunOS, purify should hopefully give me the answer. 1999-08-11 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-service.c (_finalize): * camel/camel-stream-fs.c (_finalize): (_destroy): close file descriptor. * camel/camel-stream-mem.c (_finalize): * camel/camel-store.c (_finalize): * camel/camel-folder.c (_finalize): svn path=/trunk/; revision=1104
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index a6fb1a303e..2168b3732c 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -22,6 +22,7 @@
*/
#include <config.h>
#include "camel-store.h"
+#include "camel-log.h"
static CamelServiceClass *parent_class = NULL;
@@ -35,10 +36,13 @@ static void _init(CamelStore *store, CamelSession *session, gchar *url_name);
static CamelFolder *_get_folder (CamelStore *store, const gchar *folder_name);
static gchar _get_separator (CamelStore *store);
+static void _finalize (GtkObject *object);
static void
camel_store_class_init (CamelStoreClass *camel_store_class)
{
+ GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_store_class);
+
parent_class = gtk_type_class (camel_service_get_type ());
/* virtual method definition */
@@ -48,7 +52,9 @@ camel_store_class_init (CamelStoreClass *camel_store_class)
camel_store_class->get_folder = _get_folder;
camel_store_class->get_root_folder = _get_root_folder;
camel_store_class->get_default_folder = _get_default_folder;
+
/* virtual method overload */
+ gtk_object_class->finalize = _finalize;
}
@@ -122,11 +128,27 @@ _init (CamelStore *store, CamelSession *session, gchar *url_name)
/* g_assert(session); */
g_assert(url_name);
+ if (store->session) gtk_object_unref (GTK_OBJECT (store->session));
store->session = session;
+ gtk_object_ref (GTK_OBJECT (session));
store->url_name = url_name;
}
+static void
+_finalize (GtkObject *object)
+{
+ CamelStore *camel_store = CAMEL_STORE (object);
+ CAMEL_LOG_FULL_DEBUG ("Entering CamelStore::finalize\n");
+
+ if (camel_store->url_name) g_free (camel_store->url_name);
+ if (camel_store->session) gtk_object_unref (GTK_OBJECT (camel_store->session));
+
+ GTK_OBJECT_CLASS (parent_class)->finalize (object);
+ CAMEL_LOG_FULL_DEBUG ("Leaving CamelStore::finalize\n");
+}
+
+
/**
* camel_store_set_separator: set the character which separates this folder path from the folders names in a lower level of hierarchy.