running garbage collector at the end of client & server run

This commit is contained in:
Václav Šmejkal 2024-01-20 15:57:18 +01:00
parent 7ffb9b1d9c
commit 72fcc4c3e5
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <why2/chat/flags.h>
#include <why2/chat/misc.h>
#include <why2/memory.h>
#include <why2/misc.h>
int main(void)
@ -102,5 +103,7 @@ int main(void)
free(return_line);
}
why2_clean_memory(""); //RUN GARBAGE COLLECTOR
return 0;
}

View File

@ -29,6 +29,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <why2/chat/flags.h>
#include <why2/chat/misc.h>
#include <why2/memory.h>
#include <why2/misc.h>
int main(void)
@ -75,5 +76,7 @@ int main(void)
close(listen_socket);
pthread_cancel(thread);
why2_clean_memory(""); //RUN GARBAGE COLLECTOR
return 0;
}