controller: Chain up to parent class dispose/finalize

Avoids leaks
This commit is contained in:
Edward Hervey 2012-04-12 14:59:52 +02:00
parent ff289bbc76
commit 2b49855494
4 changed files with 18 additions and 8 deletions

View file

@ -59,6 +59,7 @@ static gboolean gst_argb_control_binding_get_value_array (GstControlBinding *
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gstargbcontrolbinding", 0, \
"dynamic parameter control source attachment");
#define gst_argb_control_binding_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstARGBControlBinding, gst_argb_control_binding,
GST_TYPE_CONTROL_BINDING, _do_init);
@ -133,9 +134,8 @@ gst_argb_control_binding_constructor (GType type, guint n_construct_params,
GstARGBControlBinding *self;
self =
GST_ARGB_CONTROL_BINDING (G_OBJECT_CLASS
(gst_argb_control_binding_parent_class)
->constructor (type, n_construct_params, construct_params));
GST_ARGB_CONTROL_BINDING (G_OBJECT_CLASS (parent_class)->constructor
(type, n_construct_params, construct_params));
if (GST_CONTROL_BINDING_PSPEC (self)) {
if (!(G_PARAM_SPEC_VALUE_TYPE (GST_CONTROL_BINDING_PSPEC (self)) ==
@ -213,6 +213,8 @@ gst_argb_control_binding_dispose (GObject * object)
gst_object_replace ((GstObject **) & self->cs_g, NULL);
if (self->cs_b)
gst_object_replace ((GstObject **) & self->cs_b, NULL);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
@ -221,6 +223,8 @@ gst_argb_control_binding_finalize (GObject * object)
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (object);
g_value_unset (&self->cur_value);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gboolean

View file

@ -58,6 +58,7 @@ static gboolean gst_direct_control_binding_get_value_array (GstControlBinding *
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gstdirectcontrolbinding", 0, \
"dynamic parameter control source attachment");
#define gst_direct_control_binding_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstDirectControlBinding, gst_direct_control_binding,
GST_TYPE_CONTROL_BINDING, _do_init);
@ -154,9 +155,8 @@ gst_direct_control_binding_constructor (GType type, guint n_construct_params,
GstDirectControlBinding *self;
self =
GST_DIRECT_CONTROL_BINDING (G_OBJECT_CLASS
(gst_direct_control_binding_parent_class)
->constructor (type, n_construct_params, construct_params));
GST_DIRECT_CONTROL_BINDING (G_OBJECT_CLASS (parent_class)->constructor
(type, n_construct_params, construct_params));
if (GST_CONTROL_BINDING_PSPEC (self)) {
GType type, base;
@ -249,6 +249,8 @@ gst_direct_control_binding_dispose (GObject * object)
if (self->cs)
gst_object_replace ((GstObject **) & self->cs, NULL);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
@ -257,6 +259,8 @@ gst_direct_control_binding_finalize (GObject * object)
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (object);
g_value_unset (&self->cur_value);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gboolean

View file

@ -399,6 +399,7 @@ gst_lfo_waveform_get_type (void)
#define _do_init \
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "lfo control source", 0, "low frequency oscillator control source")
#define gst_lfo_control_source_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstLFOControlSource, gst_lfo_control_source,
GST_TYPE_CONTROL_SOURCE, _do_init);
@ -466,7 +467,7 @@ gst_lfo_control_source_finalize (GObject * obj)
gst_lfo_control_source_reset (self);
g_mutex_clear (&self->lock);
G_OBJECT_CLASS (gst_lfo_control_source_parent_class)->finalize (obj);
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
static void

View file

@ -48,6 +48,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "timed value control source", 0, \
"timed value control source base class")
#define gst_timed_value_control_source_parent_class parent_class
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstTimedValueControlSource,
gst_timed_value_control_source, GST_TYPE_CONTROL_SOURCE, _do_init);
@ -408,7 +409,7 @@ gst_timed_value_control_source_finalize (GObject * obj)
g_mutex_unlock (&self->lock);
g_mutex_clear (&self->lock);
G_OBJECT_CLASS (gst_timed_value_control_source_parent_class)->finalize (obj);
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
static void