aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-fs.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-stream-fs.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-stream-fs.c')
-rw-r--r--camel/camel-stream-fs.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c
index a8e0dcb6c4..340a87606c 100644
--- a/camel/camel-stream-fs.c
+++ b/camel/camel-stream-fs.c
@@ -43,11 +43,15 @@ static gboolean _eos (CamelStream *stream);
static void _close (CamelStream *stream);
static gint _seek (CamelStream *stream, gint offset, CamelStreamSeekPolicy policy);
+static void _finalize (GtkObject *object);
+static void _destroy (GtkObject *object);
static void
camel_stream_fs_class_init (CamelStreamFsClass *camel_stream_fs_class)
{
CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_stream_fs_class);
+ GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_stream_fs_class);
+
parent_class = gtk_type_class (gtk_object_get_type ());
/* virtual method definition */
@@ -61,6 +65,9 @@ camel_stream_fs_class_init (CamelStreamFsClass *camel_stream_fs_class)
camel_stream_class->close = _close;
camel_stream_class->seek = _seek;
+ gtk_object_class->finalize = _finalize;
+ gtk_object_class->finalize = _destroy;
+
}
@@ -90,6 +97,39 @@ camel_stream_fs_get_type (void)
}
+static void
+_destroy (GtkObject *object)
+{
+ CamelStreamFs *stream_fs = CAMEL_STREAM_FS (object);
+ gint close_error;
+
+ CAMEL_LOG_FULL_DEBUG ("Entering CamelStreamFs::destroy\n");
+
+ close_error = close (stream_fs->fd);
+ if (close_error) {
+ CAMEL_LOG_FULL_DEBUG ("CamelStreamFs::destroy Error while closing file descriptor\n");
+ CAMEL_LOG_FULL_DEBUG ( " Full error text is : %s\n", strerror(errno));
+ }
+ GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ CAMEL_LOG_FULL_DEBUG ("Leaving CamelStreamFs::destroy\n");
+}
+
+
+static void
+_finalize (GtkObject *object)
+{
+ CamelStreamFs *stream_fs = CAMEL_STREAM_FS (object);
+
+
+ CAMEL_LOG_FULL_DEBUG ("Entering CamelStreamFs::finalize\n");
+
+ if (stream_fs->name) g_free (stream_fs->name);
+
+ GTK_OBJECT_CLASS (parent_class)->finalize (object);
+ CAMEL_LOG_FULL_DEBUG ("Leaving CamelStreamFs::finalize\n");
+}
+
+
CamelStream *
camel_stream_fs_new_with_name (gchar *name, CamelStreamFsMode mode)
{