home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
At clean-up, free memory of map object definitions, too.
[plomrogue]
/
src
/
rexit.c
diff --git
a/src/rexit.c
b/src/rexit.c
index 7bd4440ab7d429607788a657c76f13e81916bcfc..e0d029f124b1d6218c2dde85e8b3167cd371aa12 100644
(file)
--- a/
src/rexit.c
+++ b/
src/rexit.c
@@
-10,7
+10,8
@@
#include "map.h" /* for Map struct */
#include "keybindings.h" /* for KeysWinData, KeyBinding structs */
#include "command_db.h" /* for free_command_db() */
#include "map.h" /* for Map struct */
#include "keybindings.h" /* for KeysWinData, KeyBinding structs */
#include "command_db.h" /* for free_command_db() */
-#include "windows.h" /* for Win struct */
+#include "windows.h" /* for Win struct, free_win() */
+#include "map_objects.h" /* for free_item_defs(), free_monster_defs() */
@@
-50,19
+51,24
@@
static void cleanup(struct World * world)
}
if (cleanup_flags & CLEANUP_WIN_INFO)
{
}
if (cleanup_flags & CLEANUP_WIN_INFO)
{
- free
(world->wins.info->_title
);
+ free
_win(world->wins.info
);
}
if (cleanup_flags & CLEANUP_WIN_MAP)
{
}
if (cleanup_flags & CLEANUP_WIN_MAP)
{
- free
(world->wins.map->_title
);
+ free
_win(world->wins.map
);
}
if (cleanup_flags & CLEANUP_WIN_LOG)
{
}
if (cleanup_flags & CLEANUP_WIN_LOG)
{
- free
(world->wins.log->_title
);
+ free
_win(world->wins.log
);
}
if (cleanup_flags & CLEANUP_WIN_KEYS)
{
}
if (cleanup_flags & CLEANUP_WIN_KEYS)
{
- free(world->wins.keys->_title);
+ free_win(world->wins.keys);
+ }
+ if (cleanup_flags & CLEANUP_MAP_OBJECT_DEFS)
+ {
+ free_item_defs(world->item_def);
+ free_monster_defs(world->monster_def);
}
}
}
}