From 80b463a043ce176168c17d3a82db01941feb4b63 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 19 Apr 2000 03:20:13 +0000 Subject: do better reference counting of streams so they actually go away when they * camel-mime-part.c (my_set_input_stream): * camel-data-wrapper.c (set_input_stream, set_output_stream): do better reference counting of streams so they actually go away when they should. svn path=/trunk/; revision=2490 --- camel/camel-data-wrapper.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'camel/camel-data-wrapper.c') diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c index 3d05ae3b54..4f071e9063 100644 --- a/camel/camel-data-wrapper.c +++ b/camel/camel-data-wrapper.c @@ -143,8 +143,10 @@ set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) if (!data_wrapper->output_stream && stream) set_output_stream (data_wrapper, stream); - if (stream) + if (stream) { gtk_object_ref (GTK_OBJECT (stream)); + gtk_object_sink (GTK_OBJECT (stream)); + } } /** @@ -201,8 +203,10 @@ set_output_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) gtk_object_unref (GTK_OBJECT (data_wrapper->output_stream)); data_wrapper->output_stream = stream; - if (stream) + if (stream) { gtk_object_ref (GTK_OBJECT (stream)); + gtk_object_sink (GTK_OBJECT (stream)); + } } /** -- cgit