Эх сурвалжийг харах

Suppr memoire objet quand fin game

Arthur Brandao 6 жил өмнө
parent
commit
a5241c1046
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      Serveur/game.c

+ 2 - 0
Serveur/game.c

@@ -325,6 +325,8 @@ void stop_game(Game* g) {
         pthread_mutex_unlock(&playerMutex[(g->index * MAXPLAYER) + i]);
     }
     //Libere la memoire
+    object_clean(g->object);
+    free(g->object);
     for (int i = 0; i < g->width; i++) {
         free(g->map[i]);
     }