Browse Source

Suppr memoire objet quand fin game

Arthur Brandao 6 years ago
parent
commit
a5241c1046
1 changed files with 2 additions and 0 deletions
  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]);
         pthread_mutex_unlock(&playerMutex[(g->index * MAXPLAYER) + i]);
     }
     }
     //Libere la memoire
     //Libere la memoire
+    object_clean(g->object);
+    free(g->object);
     for (int i = 0; i < g->width; i++) {
     for (int i = 0; i < g->width; i++) {
         free(g->map[i]);
         free(g->map[i]);
     }
     }