From 72fcc4c3e52ddeb24c8efd890e1446cdd53d266d Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 20 Jan 2024 15:57:18 +0100 Subject: [PATCH] running garbage collector at the end of client & server run --- src/chat/main/client.c | 3 +++ src/chat/main/server.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/chat/main/client.c b/src/chat/main/client.c index 3f31720..a4450e0 100644 --- a/src/chat/main/client.c +++ b/src/chat/main/client.c @@ -29,6 +29,7 @@ along with this program. If not, see . #include #include +#include #include int main(void) @@ -102,5 +103,7 @@ int main(void) free(return_line); } + why2_clean_memory(""); //RUN GARBAGE COLLECTOR + return 0; } \ No newline at end of file diff --git a/src/chat/main/server.c b/src/chat/main/server.c index d4450ea..33c9d0b 100644 --- a/src/chat/main/server.c +++ b/src/chat/main/server.c @@ -29,6 +29,7 @@ along with this program. If not, see . #include #include +#include #include int main(void) @@ -75,5 +76,7 @@ int main(void) close(listen_socket); pthread_cancel(thread); + why2_clean_memory(""); //RUN GARBAGE COLLECTOR + return 0; } \ No newline at end of file