From ae41a775211ff2da25627bee9aec5f5ab860f6eb Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Thu, 2 Mar 2023 21:30:57 -0500 Subject: [PATCH] properties_view: Move expressions to UI files Currently Loupe leaks expressions created in-code. This is because expressions need to be unwatched in order to be dropped. Since we'd need to hold a reference to the watch ourselves and unwatch them in dispose, our code would become more cumbersome if we were to try to handle this properly. This commit moves the expressions on LpPropertiesView to the UI file, as GTK handles cleaning up the expressions it creates, without any extra consideration on the app side. --- data/gtk/properties_view.ui | 10 +++++++++ src/widgets/properties_view.rs | 40 ++++++++-------------------------- 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/data/gtk/properties_view.ui b/data/gtk/properties_view.ui index d97e0fd..ddfca20 100644 --- a/data/gtk/properties_view.ui +++ b/data/gtk/properties_view.ui @@ -2,6 +2,16 @@