From 10573d882ff8387218b9c86c2a76bf77b7a0784e Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Sat, 22 May 2021 17:36:31 +0200 Subject: [PATCH] examples: gtksvideooverlay: call gst::deinit() Needed so we can use the leaks tracer. --- examples/src/bin/gtkvideooverlay.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/src/bin/gtkvideooverlay.rs b/examples/src/bin/gtkvideooverlay.rs index c6fd4a52a..1c6cb357d 100644 --- a/examples/src/bin/gtkvideooverlay.rs +++ b/examples/src/bin/gtkvideooverlay.rs @@ -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(); + } }