From: Sebastian Dröge Date: Fri, 18 Jan 2008 07:03:23 +0000 (+0000) Subject: gst/equalizer/gstiirequalizer.c: Unparent all bands from the equalizer when finalizin... X-Git-Tag: RELEASE-0_10_7~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fcf22d5a38e78f27af8bbfa3a515cc6b306202d;p=platform%2Fupstream%2Fgst-plugins-good.git gst/equalizer/gstiirequalizer.c: Unparent all bands from the equalizer when finalizing to stop leaking them. Original commit message from CVS: * gst/equalizer/gstiirequalizer.c: (gst_iir_equalizer_finalize): Unparent all bands from the equalizer when finalizing to stop leaking them. --- diff --git a/gst/equalizer/gstiirequalizer.c b/gst/equalizer/gstiirequalizer.c index 54e8abc..684e884 100644 --- a/gst/equalizer/gstiirequalizer.c +++ b/gst/equalizer/gstiirequalizer.c @@ -340,6 +340,14 @@ static void gst_iir_equalizer_finalize (GObject * object) { GstIirEqualizer *equ = GST_IIR_EQUALIZER (object); + gint i; + + for (i = 0; i < equ->freq_band_count; i++) { + if (equ->bands[i]) + gst_object_unparent (GST_OBJECT (equ->bands[i])); + equ->bands[i] = NULL; + } + equ->freq_band_count = 0; g_free (equ->bands); g_free (equ->history);