[rygel] core: Don't disconnect signals in destructor



commit 7175aed95cba9a86ff1c0cc8047d37e66b539c60
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Apr 4 22:14:11 2011 +0300

    core: Don't disconnect signals in destructor

 src/rygel/rygel-http-gst-sink.vala |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/rygel/rygel-http-gst-sink.vala b/src/rygel/rygel-http-gst-sink.vala
index 76951c6..d992938 100644
--- a/src/rygel/rygel-http-gst-sink.vala
+++ b/src/rygel/rygel-http-gst-sink.vala
@@ -81,10 +81,6 @@ internal class Rygel.HTTPGstSink : BaseSink {
         response.msg.wrote_chunk.connect (this.on_wrote_chunk);
     }
 
-    ~HTTPGstSink () {
-        this.response.msg.wrote_chunk.disconnect (this.on_wrote_chunk);
-    }
-
     public override FlowReturn preroll (Buffer buffer) {
         if (this.render_preroll) {
             return render (buffer);
@@ -151,6 +147,8 @@ internal class Rygel.HTTPGstSink : BaseSink {
         this.buffer_mutex.lock ();
         this.buffer_condition.broadcast ();
         this.buffer_mutex.unlock ();
+
+        this.response.msg.wrote_chunk.disconnect (this.on_wrote_chunk);
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]