spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit 79e048637f189a5dbb2f27534863817fbe08acb9
parent eea3100610c6d0d6b542c42d9172a9e1047f2dfa
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Fri,  7 May 2010 22:15:11 +1000

Clean up source unreferencing

Diffstat:
Msrc/spek-source.vala | 8+-------
Msrc/spek-spectrogram.vala | 1-
2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/spek-source.vala b/src/spek-source.vala @@ -25,6 +25,7 @@ namespace Spek { } public void stop () { + // Need to manually remove the bus watch, otherwise `this` is never unreferenced. if (watch_id > 0) { GLib.Source.remove (watch_id); watch_id = 0; @@ -33,13 +34,6 @@ namespace Spek { pipeline.set_state (State.NULL); pipeline = null; } - spectrum = null; - pad = null; - } - - ~Source () { - stop (); - stdout.printf ("unref\n"); } construct { diff --git a/src/spek-spectrogram.vala b/src/spek-spectrogram.vala @@ -24,7 +24,6 @@ namespace Spek { this.image = new ImageSurface (Format.RGB24, allocation.width, allocation.height); if (this.source != null) { this.source.stop (); - this.source = null; } this.source = new Source ( file_name, allocation.height, allocation.width,