mirror of
https://github.com/alexkay/spek.git
synced 2025-04-17 00:52:20 +03:00
Clean up source unreferencing
This commit is contained in:
parent
eea3100610
commit
79e048637f
@ -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 {
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user