delete les animaux lors du lancement de la simulation

This commit is contained in:
Mylloon 2022-04-02 17:06:43 +02:00
parent de1506033f
commit f5dbbcf28d
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -15,6 +15,9 @@ void lancerSimulation(Univers ** univers, int m, int n, int nb_moutons, int nb_l
} }
(*univers)->ajoutAnimaux(animaux); (*univers)->ajoutAnimaux(animaux);
for(Animal *const &animal: animaux)
delete animal;
} }
void arreterSimulation(Univers * univers) { void arreterSimulation(Univers * univers) {