mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 09:31:06 +00:00
iterator: Fix leak of the closure in Iterator::filter()
This commit is contained in:
parent
e6df685667
commit
a71cc91001
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ where
|
||||||
|
|
||||||
let func_box: Box<dyn Fn(T) -> bool + Send + Sync + 'static> = Box::new(func);
|
let func_box: Box<dyn Fn(T) -> bool + Send + Sync + 'static> = Box::new(func);
|
||||||
let mut closure_value = glib::Value::from_type(from_glib(filter_boxed_get_type::<T>()));
|
let mut closure_value = glib::Value::from_type(from_glib(filter_boxed_get_type::<T>()));
|
||||||
gobject_sys::g_value_set_boxed(
|
gobject_sys::g_value_take_boxed(
|
||||||
closure_value.to_glib_none_mut().0,
|
closure_value.to_glib_none_mut().0,
|
||||||
Arc::into_raw(Arc::new(func_box)) as gpointer,
|
Arc::into_raw(Arc::new(func_box)) as gpointer,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue