From: Florian Forster Date: Sat, 2 Feb 2008 00:01:56 +0000 (+0100) Subject: src/sn-evolution.c: Free the population before exiting. X-Git-Tag: v1.0.0~118 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=59ace47e99699dfefeb4ea10fc1f41288d0b951d;p=sort-networks.git src/sn-evolution.c: Free the population before exiting. --- diff --git a/src/sn-evolution.c b/src/sn-evolution.c index f43906e..d3184d9 100644 --- a/src/sn-evolution.c +++ b/src/sn-evolution.c @@ -245,6 +245,19 @@ int main (int argc, char **argv) sn_network_show (population[best_index].network); } + { + int i; + + for (i = 0; i < population_size; i++) + { + sn_network_destroy (population[i].network); + population[i].network = NULL; + } + + free (population); + population = 0; + } + return (0); } /* int main */