Explorar el Código

Suppr memoire objet quand fin game

Arthur Brandao hace 6 años
padre
commit
a5241c1046
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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]);
     }