From 68a189dba107f77e439783eaa0ded006233cb7e3 Mon Sep 17 00:00:00 2001 From: Vftdan Date: Sun, 18 Aug 2024 14:43:19 +0200 Subject: [PATCH] Automatically call module registry cleanup on exit --- main.c | 1 - module_registry.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 7997767..0a8565c 100644 --- a/main.c +++ b/main.c @@ -92,6 +92,5 @@ main(int argc, char ** argv) io_subscription_list_deinit(&state.wait_output); io_subscription_list_deinit(&state.wait_input); - destroy_graph_node_specification_registry(); return 0; } diff --git a/module_registry.c b/module_registry.c index 10bedce..6daa1a9 100644 --- a/module_registry.c +++ b/module_registry.c @@ -35,6 +35,7 @@ lookup_graph_node_specification(const char * name) } void +__attribute__((destructor)) void destroy_graph_node_specification_registry() { ensure_initialized();