examples: gtksvideooverlay: call gst::deinit()

Needed so we can use the leaks tracer.
This commit is contained in:
Guillaume Desmottes 2021-05-22 17:36:31 +02:00
parent c1c06868e9
commit 10573d882f

View file

@ -262,8 +262,15 @@ fn main() {
gst::init().unwrap();
gtk::init().unwrap();
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE);
{
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE);
app.connect_activate(create_ui);
app.run();
app.connect_activate(create_ui);
app.run();
}
// Optional, can be used to detect leaks using the leaks tracer
unsafe {
gst::deinit();
}
}