Skip to content
Snippets Groups Projects
Commit 53cb9eff authored by Le Van Truong's avatar Le Van Truong
Browse files

Fix memory leak problem

parent 8a815463
No related branches found
No related tags found
5 merge requests!369Fix memory leak problem,!368Fix memory leak problem,!367Fix memory leak problem,!366Fix memory leak problem,!364Fix memory leak problem
......@@ -78,6 +78,8 @@ TMLTask::~TMLTask(){
}
#endif
if (_comment!=0) delete [] _comment;
if(_cpus != 0) delete[] _cpus; // free the allocation of cpu array
if(_fpgas != 0) delete[] _fpgas; // free the allocation of fpga array
}
std::string TMLTask::toShortString() const{
......
......@@ -71,9 +71,16 @@ SimComponents::~SimComponents(){
for(SerializableList::iterator i=_serList.begin(); i != _serList.end(); ++i){
delete (*i);
}
for(SlaveList::iterator i=_slList.begin(); i != _slList.end(); ++i){
delete (*i);
}
for(TaskList::const_iterator i=_taskList.begin(); i != _taskList.end(); ++i){
//free tasks before terminate simulator
delete (*i);
}
#ifdef EBRDD_ENABLED
for(EBRDDList::iterator i=_ebrddList.begin(); i != _ebrddList.end(); ++i){
delete (*i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment