Commit c76cc7b8 authored by Julien Gamba's avatar Julien Gamba

Free buffer after individuals are copied to main population

parent 96e438ca
......@@ -554,8 +554,10 @@ void CEvolutionaryAlgorithm::receiveIndividuals(){
this->server->read_data_lock();
string line = this->server->parm->data[this->treatedIndividuals].data;
this->population->parents[index]->deserialize(line);
//TAG THE INDIVIDUAL AS IMMIGRANT
this->population->parents[index]->isImmigrant = true;
//TAG THE INDIVIDUAL AS IMMIGRANT
this->population->parents[index]->isImmigrant = true;
delete [] this->population->parents;
this->population->parents = NULL;
this->server->read_data_unlock();
//cout << "new Individual :" << this->population->parents[index]->serialize() << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment