summaryrefslogtreecommitdiff
path: root/src/map/pc_groups.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-01 23:21:45 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-01 23:21:45 +0000
commit12e0b7a12a177cee9ab6e1f16d032d05da47a429 (patch)
tree7d5ffe863344db9fb82eef811107e5805ba5fafe /src/map/pc_groups.c
parent983fcb851918b1ab40c182f6719b7e800fe0d643 (diff)
downloadhercules-12e0b7a12a177cee9ab6e1f16d032d05da47a429.tar.gz
hercules-12e0b7a12a177cee9ab6e1f16d032d05da47a429.tar.bz2
hercules-12e0b7a12a177cee9ab6e1f16d032d05da47a429.tar.xz
hercules-12e0b7a12a177cee9ab6e1f16d032d05da47a429.zip
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
Diffstat (limited to 'src/map/pc_groups.c')
-rw-r--r--src/map/pc_groups.c14
1 files changed, 2 insertions, 12 deletions
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,29 +422,19 @@ 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
*/
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();