[farsight2/master] Remove useless dispose functions

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:26:03 PST 2008


---
 transmitters/nice/fs-nice-stream-transmitter.c |   11 +----------
 transmitters/nice/fs-nice-transmitter.c        |   11 -----------
 2 files changed, 1 insertions(+), 21 deletions(-)

diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index e191663..5bbf402 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -63,8 +63,6 @@ enum
 
 struct _FsNiceStreamTransmitterPrivate
 {
-  gboolean disposed;
-
   /* We don't actually hold a ref to this,
    * But since our parent FsStream can not exist without its parent
    * FsSession, we should be safe
@@ -157,7 +155,6 @@ fs_nice_stream_transmitter_init (FsNiceStreamTransmitter *self)
 {
   /* member init */
   self->priv = FS_NICE_STREAM_TRANSMITTER_GET_PRIVATE (self);
-  self->priv->disposed = FALSE;
 
   self->priv->sending = TRUE;
 }
@@ -165,14 +162,8 @@ fs_nice_stream_transmitter_init (FsNiceStreamTransmitter *self)
 static void
 fs_nice_stream_transmitter_dispose (GObject *object)
 {
-  FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (object);
-
-  if (self->priv->disposed)
-    /* If dispose did already run, return. */
-    return;
+  //FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (object);
 
-  /* Make sure dispose does not run twice. */
-  self->priv->disposed = TRUE;
 
   parent_class->dispose (object);
 }
diff --git a/transmitters/nice/fs-nice-transmitter.c b/transmitters/nice/fs-nice-transmitter.c
index 66cd225..109793d 100644
--- a/transmitters/nice/fs-nice-transmitter.c
+++ b/transmitters/nice/fs-nice-transmitter.c
@@ -73,8 +73,6 @@ struct _FsNiceTransmitterPrivate
   /* They are tables of pointers, one per component */
   GstElement **src_funnels;
   GstElement **sink_tees;
-
-  gboolean disposed;
 };
 
 #define FS_NICE_TRANSMITTER_GET_PRIVATE(o)  \
@@ -197,7 +195,6 @@ fs_nice_transmitter_init (FsNiceTransmitter *self)
 
   /* member init */
   self->priv = FS_NICE_TRANSMITTER_GET_PRIVATE (self);
-  self->priv->disposed = FALSE;
 
   self->components = 2;
 }
@@ -354,11 +351,6 @@ fs_nice_transmitter_dispose (GObject *object)
 {
   FsNiceTransmitter *self = FS_NICE_TRANSMITTER (object);
 
-  if (self->priv->disposed) {
-    /* If dispose did already run, return. */
-    return;
-  }
-
   if (self->priv->gst_src) {
     gst_object_unref (self->priv->gst_src);
     self->priv->gst_src = NULL;
@@ -369,9 +361,6 @@ fs_nice_transmitter_dispose (GObject *object)
     self->priv->gst_sink = NULL;
   }
 
-  /* Make sure dispose does not run twice. */
-  self->priv->disposed = TRUE;
-
   parent_class->dispose (object);
 }
 
-- 
1.5.6.5




More information about the farsight-commits mailing list