From 12e0b7a12a177cee9ab6e1f16d032d05da47a429 Mon Sep 17 00:00:00 2001 From: gepard1984 Date: Thu, 1 Mar 2012 23:21:45 +0000 Subject: Enabled `DB_OPT_RELEASE_DATA` for several `DBMap`s to simplify data freeing. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15644 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc_groups.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/map/pc_groups.c') diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index 8d35a0013..379968c79 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -422,21 +422,11 @@ int pc_group_id2level(int group_id) */ void do_init_pc_groups(void) { - pc_group_db = idb_alloc(DB_OPT_BASE); + pc_group_db = idb_alloc(DB_OPT_RELEASE_DATA); pc_groupname_db = stridb_alloc(DB_OPT_DUP_KEY, 0); read_config(); } -/** - * DBApply helper function for do_final_pc_groups - * @private - */ -static int group_db_free(DBKey key, void *data, va_list args) -{ - aFree((GroupSettings*)data); - return 1; -} - /** * Finalize PC Groups: free DBMaps and config. * @public @@ -444,7 +434,7 @@ static int group_db_free(DBKey key, void *data, va_list args) void do_final_pc_groups(void) { if (pc_group_db != NULL) - pc_group_db->destroy(pc_group_db, group_db_free); + db_destroy(pc_group_db); if (pc_groupname_db != NULL ) db_destroy(pc_groupname_db); destroy_config(); -- cgit v1.2.3-60-g2f50