diff options
author | bertrand <Bertrand.Guiheneuf@aful.org> | 1999-08-11 07:22:44 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-08-11 07:22:44 +0800 |
commit | 9d041c9464b7e13cce7368e644781971d9ad5501 (patch) | |
tree | a7671cef07919885cb61baa31cade7bdccaa7a1e /camel/camel-simple-data-wrapper.c | |
parent | 7d7f5423308313eb30558700598091b4ba1f0d20 (diff) | |
download | gsoc2013-evolution-9d041c9464b7e13cce7368e644781971d9ad5501.tar gsoc2013-evolution-9d041c9464b7e13cce7368e644781971d9ad5501.tar.gz gsoc2013-evolution-9d041c9464b7e13cce7368e644781971d9ad5501.tar.bz2 gsoc2013-evolution-9d041c9464b7e13cce7368e644781971d9ad5501.tar.lz gsoc2013-evolution-9d041c9464b7e13cce7368e644781971d9ad5501.tar.xz gsoc2013-evolution-9d041c9464b7e13cce7368e644781971d9ad5501.tar.zst gsoc2013-evolution-9d041c9464b7e13cce7368e644781971d9ad5501.zip |
implemented destructors.
1999-08-11 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/camel-multipart.c (_finalize):
* camel/camel-simple-data-wrapper.c (_finalize):
* camel/camel-mime-part.c (_finalize):
implemented destructors.
* camel/gmime-content-field.c (gmime_content_field_ref):
(gmime_content_field_unref):
New reference mechanism for GMimeContentField objects.
* camel/camel-data-wrapper.c (_finalize):
Started implementing destructors.
* camel/camel-mime-part.c (_construct_from_stream):
* camel/gmime-content-field.c (gmime_content_field_write_to_stream):
* camel/camel-multipart.c (_construct_from_stream):
removed forgotten anarchic traces.
Go away memory leaks!
svn path=/trunk/; revision=1103
Diffstat (limited to 'camel/camel-simple-data-wrapper.c')
-rw-r--r-- | camel/camel-simple-data-wrapper.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/camel/camel-simple-data-wrapper.c b/camel/camel-simple-data-wrapper.c index a2203a52e8..99bd0b2075 100644 --- a/camel/camel-simple-data-wrapper.c +++ b/camel/camel-simple-data-wrapper.c @@ -32,18 +32,22 @@ static CamelDataWrapperClass *parent_class=NULL; static void _construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); static void _write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); +static void _finalize (GtkObject *object); static void camel_simple_data_wrapper_class_init (CamelSimpleDataWrapperClass *camel_simple_data_wrapper_class) { CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (camel_simple_data_wrapper_class); - + GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_data_wrapper_class); + parent_class = gtk_type_class (camel_data_wrapper_get_type ()); /* virtual method definition */ /* virtual method overload */ camel_data_wrapper_class->write_to_stream = _write_to_stream; camel_data_wrapper_class->construct_from_stream = _construct_from_stream; + + gtk_object_class->finalize = _finalize; } @@ -76,6 +80,18 @@ camel_simple_data_wrapper_get_type (void) } +static void +_finalize (GtkObject *object) +{ + CamelSimpleDataWrapper *simple_data_wrapper = CAMEL_SIMPLE_DATA_WRAPPER (object); + + CAMEL_LOG_FULL_DEBUG ("Entering CamelMimePart::finalize\n"); + if (simple_data_wrapper->byte_array) g_byte_array_free (simple_data_wrapper->byte_array, TRUE); + + GTK_OBJECT_CLASS (parent_class)->finalize (object); + CAMEL_LOG_FULL_DEBUG ("Leaving CamelMimePart::finalize\n"); +} + /** * camel_simple_data_wrapper_new: create a new CamelSimpleDataWrapper object |