diff options
author | bertrand <Bertrand.Guiheneuf@aful.org> | 1999-08-11 18:59:17 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-08-11 18:59:17 +0800 |
commit | 33ffe9aadcef483a4900cc65fc9e840220951e3c (patch) | |
tree | dda45ce6ecb34bc2a2dc6a342dd526f95e072da6 /camel/camel-folder.c | |
parent | 9d041c9464b7e13cce7368e644781971d9ad5501 (diff) | |
download | gsoc2013-evolution-33ffe9aadcef483a4900cc65fc9e840220951e3c.tar.gz 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-folder.c')
-rw-r--r-- | camel/camel-folder.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c index 2d0a29faab..1ea2a7247b 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -22,6 +22,7 @@ */ #include <config.h> #include "camel-folder.h" +#include "camel-log.h" #include "string-utils.h" static GtkObjectClass *parent_class=NULL; @@ -53,10 +54,13 @@ static CamelMimeMessage *_get_message (CamelFolder *folder, gint number); static gint _get_message_count (CamelFolder *folder); static gint _append_message (CamelFolder *folder, CamelMimeMessage *message); +static void _finalize (GtkObject *object); static void camel_folder_class_init (CamelFolderClass *camel_folder_class) { + GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_folder_class); + parent_class = gtk_type_class (gtk_object_get_type ()); /* virtual method definition */ @@ -83,6 +87,7 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class) camel_folder_class->append_message = _append_message; /* virtual method overload */ + gtk_object_class->finalize = _finalize; } @@ -116,6 +121,18 @@ camel_folder_get_type (void) } +static void +_finalize (GtkObject *object) +{ + CamelFolder *camel_folder = CAMEL_FOLDER (object); + CAMEL_LOG_FULL_DEBUG ("Entering CamelFolder::finalize\n"); + + if (camel_folder->name) g_free (camel_folder->name); + if (camel_folder->full_name) g_free (camel_folder->full_name); + + GTK_OBJECT_CLASS (parent_class)->finalize (object); + CAMEL_LOG_FULL_DEBUG ("Leaving CamelFolder::finalize\n"); +} /** @@ -131,7 +148,9 @@ _init_with_store (CamelFolder *folder, CamelStore *parent_store) g_assert(folder); g_assert(parent_store); + if (folder->parent_store) gtk_object_unref (GTK_OBJECT (folder->parent_store)); folder->parent_store = parent_store; + if (parent_store) gtk_object_ref (GTK_OBJECT (parent_store)); } @@ -455,7 +474,6 @@ _create(CamelFolder *folder) } else { parent = camel_store_get_folder (folder->parent_store, prefix); camel_folder_create (parent); - gtk_object_unref (GTK_OBJECT (parent)); } } } |