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-stream-mem.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-stream-mem.c')
-rw-r--r-- | camel/camel-stream-mem.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/camel/camel-stream-mem.c b/camel/camel-stream-mem.c index 2fa2c7c306..592caa5063 100644 --- a/camel/camel-stream-mem.c +++ b/camel/camel-stream-mem.c @@ -43,11 +43,14 @@ 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 camel_stream_mem_class_init (CamelStreamMemClass *camel_stream_mem_class) { CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_stream_mem_class); + GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_stream_mem_class); + parent_class = gtk_type_class (gtk_object_get_type ()); /* virtual method definition */ @@ -61,6 +64,8 @@ camel_stream_mem_class_init (CamelStreamMemClass *camel_stream_mem_class) camel_stream_class->close = _close; camel_stream_class->seek = _seek; + gtk_object_class->finalize = _finalize; + } static void @@ -106,6 +111,20 @@ camel_stream_mem_new (CamelStreamMemMode mode) return CAMEL_STREAM (stream_mem); } +static void +_finalize (GtkObject *object) +{ + CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (object); + + + CAMEL_LOG_FULL_DEBUG ("Entering CamelStreamMem::finalize\n"); + g_byte_array_free (stream_mem->buffer, TRUE); + + GTK_OBJECT_CLASS (parent_class)->finalize (object); + CAMEL_LOG_FULL_DEBUG ("Leaving CamelStreamMem::finalize\n"); +} + + /** * _read: read bytes from a stream |