1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Free windows on exit

This commit is contained in:
James Booth 2013-08-26 17:47:29 +01:00
parent 18d11f2bcf
commit bca379844d
4 changed files with 13 additions and 2 deletions

View File

@ -135,6 +135,7 @@ void
ui_close(void)
{
notifier_uninit();
wins_destroy();
endwin();
}

View File

@ -57,8 +57,6 @@ win_free(ProfWin* window)
{
delwin(window->win);
free(window->from);
window->from = NULL;
window->win = NULL;
free(window);
window = NULL;
}

View File

@ -455,3 +455,14 @@ wins_create_summary(void)
return result;
}
void
wins_destroy(void)
{
int i;
for (i = 0; i < NUM_WINS; i++) {
if (windows[i] != NULL) {
win_free(windows[i]);
}
}
}

View File

@ -47,5 +47,6 @@ GSList * wins_get_prune_recipients(void);
void wins_lost_connection(void);
gboolean wins_tidy(void);
GSList * wins_create_summary(void);
void wins_destroy(void);
#endif