delete les animaux lors du lancement de la simulation
This commit is contained in:
parent
de1506033f
commit
f5dbbcf28d
1 changed files with 3 additions and 0 deletions
3
main.cpp
3
main.cpp
|
@ -15,6 +15,9 @@ void lancerSimulation(Univers ** univers, int m, int n, int nb_moutons, int nb_l
|
|||
}
|
||||
|
||||
(*univers)->ajoutAnimaux(animaux);
|
||||
|
||||
for(Animal *const &animal: animaux)
|
||||
delete animal;
|
||||
}
|
||||
|
||||
void arreterSimulation(Univers * univers) {
|
||||
|
|
Reference in a new issue