diff options
Diffstat (limited to 'src/analysis/db')
-rw-r--r-- | src/analysis/db/collection.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/analysis/db/collection.c b/src/analysis/db/collection.c index 9c28c4a..0a617f3 100644 --- a/src/analysis/db/collection.c +++ b/src/analysis/db/collection.c @@ -149,6 +149,18 @@ static void g_db_collection_init(GDbCollection *collec) static void g_db_collection_dispose(GDbCollection *collec) { + if (collec->items != NULL) + { + g_list_free_full(collec->items, g_object_unref); + collec->items = NULL; + } + + if (collec->sorted != NULL) + { + g_list_free_full(collec->sorted, g_object_unref); + collec->sorted = NULL; + } + G_OBJECT_CLASS(g_db_collection_parent_class)->dispose(G_OBJECT(collec)); } @@ -1130,6 +1142,8 @@ bool g_db_collection_load_all_items(GDbCollection *collec, sqlite3 *db) result = g_db_item_load(new, values, count); result &= g_db_collection_add_item(G_DB_COLLECTION(collec), new); + g_object_unref(G_OBJECT(new)); + } /* Sortie propre */ |