summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/collections.c25
-rw-r--r--src/core/collections.h3
2 files changed, 28 insertions, 0 deletions
diff --git a/src/core/collections.c b/src/core/collections.c
index d045e5a..a047a15 100644
--- a/src/core/collections.c
+++ b/src/core/collections.c
@@ -183,3 +183,28 @@ GList *create_collections_list(void)
return result;
}
+
+
+/******************************************************************************
+* *
+* Paramètres : collec = liste complète de collections à traiter. [OUT] *
+* *
+* Description : Détruit un ensemble de collections. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void delete_collections_list(GList **collec)
+{
+ if (*collec != NULL)
+ {
+ g_list_free_full(*collec, g_object_unref);
+
+ *collec = NULL;
+
+ }
+
+}
diff --git a/src/core/collections.h b/src/core/collections.h
index 1191f4c..d60125b 100644
--- a/src/core/collections.h
+++ b/src/core/collections.h
@@ -44,6 +44,9 @@ void unload_collection_definitions(void);
/* Construit un nouvel ensemble de collections. */
GList *create_collections_list(void);
+/* Détruit un ensemble de collections. */
+void delete_collections_list(GList **);
+
#endif /* _ANALYSIS_DB_COLLECTION_H */