From 3dbec4d7090eb8b664b9b69344796366b9896b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 3 Apr 2019 00:21:04 +0200 Subject: [PATCH] monitor-config-manager: Define cleanup functions for structs Monitor configuration structures can be used inside containers such as GList and in order to have smart cleanups we need to define the relative free function Part-of: --- src/backends/meta-monitor-config-manager.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backends/meta-monitor-config-manager.h b/src/backends/meta-monitor-config-manager.h index 86756a7e3..192d91536 100644 --- a/src/backends/meta-monitor-config-manager.h +++ b/src/backends/meta-monitor-config-manager.h @@ -198,4 +198,11 @@ gboolean meta_verify_monitors_config (MetaMonitorsConfig *config, MetaMonitorManager *monitor_manager, GError **error); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorConfig, meta_monitor_config_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaLogicalMonitorConfig, + meta_logical_monitor_config_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorsConfigKey, + meta_monitors_config_key_free) + #endif /* META_MONITOR_CONFIG_MANAGER_H */