more curses memory

Message history now cleaned up at game end.  Status window cleanup is
not taking place because the core is suppressing it #if STATUS_HILITES.
This commit is contained in:
PatR
2019-02-08 16:51:33 -08:00
parent f3072cdb43
commit d4d7901eff
5 changed files with 75 additions and 130 deletions
+15
View File
@@ -266,6 +266,21 @@ curses_init_mesg_history()
}
}
/* Delete message history at game end. */
void
curses_teardown_messages(void)
{
nhprev_mesg *current_mesg;
while ((current_mesg = first_mesg) != 0) {
first_mesg = current_mesg->next_mesg;
free(current_mesg->str);
free(current_mesg);
}
last_mesg = (nhprev_mesg *) 0;
num_messages = 0;
}
/* Display previous message window messages in reverse chron order */