- fixed a memory leak and fixed a segfault in a thread class
This commit is contained in:
parent
a37dc8a7b3
commit
1403a3fe44
|
@ -387,6 +387,7 @@ void CoreData::load() {
|
||||||
menuMusic.open(getGameCustomCoreDataPath(data_path, "data/core/" + menuMusicPath + menuMusicFile));
|
menuMusic.open(getGameCustomCoreDataPath(data_path, "data/core/" + menuMusicPath + menuMusicFile));
|
||||||
menuMusic.setNext(&menuMusic);
|
menuMusic.setNext(&menuMusic);
|
||||||
|
|
||||||
|
cleanup();
|
||||||
waterSounds.resize(6);
|
waterSounds.resize(6);
|
||||||
|
|
||||||
for(int i=0; i<6; ++i){
|
for(int i=0; i<6; ++i){
|
||||||
|
|
|
@ -412,17 +412,19 @@ void SimpleTaskThread::execute() {
|
||||||
sleep(this->millisecsBetweenExecutions);
|
sleep(this->millisecsBetweenExecutions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] END\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||||
|
mustDeleteSelf = getDeleteSelfOnExecutionDone();
|
||||||
}
|
}
|
||||||
catch(const exception &ex) {
|
catch(const exception &ex) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] END\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||||
|
mustDeleteSelf = getDeleteSelfOnExecutionDone();
|
||||||
|
|
||||||
throw megaglest_runtime_error(ex.what());
|
throw megaglest_runtime_error(ex.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s] END\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
|
||||||
mustDeleteSelf = getDeleteSelfOnExecutionDone();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mustDeleteSelf == true) {
|
if(mustDeleteSelf == true) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user