mirror of
https://github.com/glest/glest-source.git
synced 2025-10-01 01:46:42 +02:00
- tighten up code.. ensure pointers set to null after delete, etc
This commit is contained in:
@@ -79,8 +79,10 @@ ParticleSystemType::~ParticleSystemType() {
|
|||||||
memoryObjectList[this]--;
|
memoryObjectList[this]--;
|
||||||
assert(memoryObjectList[this] == 0);
|
assert(memoryObjectList[this] == 0);
|
||||||
}
|
}
|
||||||
for(Children::iterator it = children.begin(); it != children.end(); ++it)
|
for(Children::iterator it = children.begin(); it != children.end(); ++it) {
|
||||||
delete *it;
|
delete *it;
|
||||||
|
}
|
||||||
|
children.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParticleSystemType::copyAll(const ParticleSystemType &src) {
|
void ParticleSystemType::copyAll(const ParticleSystemType &src) {
|
||||||
|
@@ -165,6 +165,7 @@ void cleanupCRCThread() {
|
|||||||
}
|
}
|
||||||
if(preCacheThread->getRunningStatus() == false) {
|
if(preCacheThread->getRunningStatus() == false) {
|
||||||
delete preCacheThread;
|
delete preCacheThread;
|
||||||
|
preCacheThread=NULL;
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("C - shutting down crc threads\n");
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("C - shutting down crc threads\n");
|
||||||
}
|
}
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
@@ -175,6 +176,7 @@ void cleanupCRCThread() {
|
|||||||
if(preCacheThread->canShutdown(false) == true) {
|
if(preCacheThread->canShutdown(false) == true) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
delete preCacheThread;
|
delete preCacheThread;
|
||||||
|
preCacheThread=NULL;
|
||||||
|
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("E - shutting down crc threads\n");
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("E - shutting down crc threads\n");
|
||||||
//printf("Stopping broadcast thread [%p] - C\n",broadCastThread);
|
//printf("Stopping broadcast thread [%p] - C\n",broadCastThread);
|
||||||
@@ -288,8 +290,8 @@ void fatal(const char *s, ...) // failure exit
|
|||||||
MessageBox(NULL, wstr, wstr1, MB_OK|MB_SYSTEMMODAL);
|
MessageBox(NULL, wstr, wstr1, MB_OK|MB_SYSTEMMODAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete [] wstr;
|
if(wstr) delete [] wstr;
|
||||||
delete [] wstr1;
|
if(wstr1) delete [] wstr1;
|
||||||
#endif
|
#endif
|
||||||
//SDL_Quit();
|
//SDL_Quit();
|
||||||
}
|
}
|
||||||
@@ -4602,6 +4604,7 @@ int glestMain(int argc, char** argv) {
|
|||||||
printf("\nInvalid map name specified on commandline [%s] map [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
printf("\nInvalid map name specified on commandline [%s] map [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
||||||
printParameterHelp(argv[0],foundInvalidArgs);
|
printParameterHelp(argv[0],foundInvalidArgs);
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4640,6 +4643,7 @@ int glestMain(int argc, char** argv) {
|
|||||||
printf("\nInvalid host specified on commandline [%s] host [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
printf("\nInvalid host specified on commandline [%s] host [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
||||||
printParameterHelp(argv[0],foundInvalidArgs);
|
printParameterHelp(argv[0],foundInvalidArgs);
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4669,6 +4673,7 @@ int glestMain(int argc, char** argv) {
|
|||||||
printf("\nInvalid host specified on commandline [%s] host [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
printf("\nInvalid host specified on commandline [%s] host [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
||||||
printParameterHelp(argv[0],foundInvalidArgs);
|
printParameterHelp(argv[0],foundInvalidArgs);
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4692,6 +4697,7 @@ int glestMain(int argc, char** argv) {
|
|||||||
printf("\nInvalid scenario name specified on commandline [%s] scenario [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
printf("\nInvalid scenario name specified on commandline [%s] scenario [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
||||||
printParameterHelp(argv[0],foundInvalidArgs);
|
printParameterHelp(argv[0],foundInvalidArgs);
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4711,6 +4717,7 @@ int glestMain(int argc, char** argv) {
|
|||||||
printf("%s",renderer.getGlMoreInfo().c_str());
|
printf("%s",renderer.getGlMoreInfo().c_str());
|
||||||
|
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4828,12 +4835,14 @@ int glestMain(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("\nInvalid model specified on commandline [%s] texture [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
printf("\nInvalid model specified on commandline [%s] texture [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
||||||
printParameterHelp(argv[0],foundInvalidArgs);
|
printParameterHelp(argv[0],foundInvalidArgs);
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4844,6 +4853,7 @@ int glestMain(int argc, char** argv) {
|
|||||||
runTechValidationReport(argc, argv);
|
runTechValidationReport(argc, argv);
|
||||||
|
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4851,6 +4861,7 @@ int glestMain(int argc, char** argv) {
|
|||||||
runTilesetValidationReport(argc, argv);
|
runTilesetValidationReport(argc, argv);
|
||||||
|
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
mainWindow=NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -246,10 +246,11 @@ void MainMenu::setState(MenuState *newstate) {
|
|||||||
//this->state = newstate;
|
//this->state = newstate;
|
||||||
|
|
||||||
if(oldstate != NULL && oldstate != newstate) {
|
if(oldstate != NULL && oldstate != newstate) {
|
||||||
|
MenuState *oldstatePtr = oldstate;
|
||||||
delete oldstate;
|
delete oldstate;
|
||||||
|
|
||||||
//printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
if(oldstate != this->state) {
|
if(oldstatePtr != this->state) {
|
||||||
oldstate=this->state;
|
oldstate=this->state;
|
||||||
//printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
}
|
}
|
||||||
|
@@ -50,6 +50,7 @@ public:
|
|||||||
StaticSound *&operator[](int i) {return sounds[i];}
|
StaticSound *&operator[](int i) {return sounds[i];}
|
||||||
|
|
||||||
const Sounds &getSounds() const {return sounds;}
|
const Sounds &getSounds() const {return sounds;}
|
||||||
|
void clearSounds() {sounds.clear();}
|
||||||
Sounds *getSoundsPtr() {return &sounds;}
|
Sounds *getSoundsPtr() {return &sounds;}
|
||||||
StaticSound *getRandSound() const;
|
StaticSound *getRandSound() const;
|
||||||
};
|
};
|
||||||
|
@@ -63,6 +63,7 @@ DamageMultiplierTable::DamageMultiplierTable(){
|
|||||||
|
|
||||||
DamageMultiplierTable::~DamageMultiplierTable(){
|
DamageMultiplierTable::~DamageMultiplierTable(){
|
||||||
delete [] values;
|
delete [] values;
|
||||||
|
values=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageMultiplierTable::init(int attackTypeCount, int armorTypeCount){
|
void DamageMultiplierTable::init(int attackTypeCount, int armorTypeCount){
|
||||||
|
@@ -742,6 +742,7 @@ AttackSkillType::~AttackSkillType() {
|
|||||||
delete splashParticleSystemType;
|
delete splashParticleSystemType;
|
||||||
splashParticleSystemType = NULL;
|
splashParticleSystemType = NULL;
|
||||||
deleteValues(projSounds.getSounds().begin(), projSounds.getSounds().end());
|
deleteValues(projSounds.getSounds().begin(), projSounds.getSounds().end());
|
||||||
|
projSounds.clearSounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackSkillType::load(const XmlNode *sn, const XmlNode *attackBoostsNode,
|
void AttackSkillType::load(const XmlNode *sn, const XmlNode *attackBoostsNode,
|
||||||
|
@@ -143,10 +143,15 @@ UnitType::UnitType() : ProducibleType() {
|
|||||||
|
|
||||||
UnitType::~UnitType(){
|
UnitType::~UnitType(){
|
||||||
deleteValues(commandTypes.begin(), commandTypes.end());
|
deleteValues(commandTypes.begin(), commandTypes.end());
|
||||||
|
commandTypes.clear();
|
||||||
deleteValues(skillTypes.begin(), skillTypes.end());
|
deleteValues(skillTypes.begin(), skillTypes.end());
|
||||||
|
skillTypes.clear();
|
||||||
deleteValues(selectionSounds.getSounds().begin(), selectionSounds.getSounds().end());
|
deleteValues(selectionSounds.getSounds().begin(), selectionSounds.getSounds().end());
|
||||||
|
selectionSounds.clearSounds();
|
||||||
deleteValues(commandSounds.getSounds().begin(), commandSounds.getSounds().end());
|
deleteValues(commandSounds.getSounds().begin(), commandSounds.getSounds().end());
|
||||||
|
commandSounds.clearSounds();
|
||||||
delete [] cellMap;
|
delete [] cellMap;
|
||||||
|
cellMap=NULL;
|
||||||
//remove damageParticleSystemTypes
|
//remove damageParticleSystemTypes
|
||||||
while(!damageParticleSystemTypes.empty()){
|
while(!damageParticleSystemTypes.empty()){
|
||||||
delete damageParticleSystemTypes.back();
|
delete damageParticleSystemTypes.back();
|
||||||
|
@@ -140,6 +140,7 @@ SurfaceCell::SurfaceCell() {
|
|||||||
|
|
||||||
SurfaceCell::~SurfaceCell() {
|
SurfaceCell::~SurfaceCell() {
|
||||||
delete object;
|
delete object;
|
||||||
|
object=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SurfaceCell::end(){
|
void SurfaceCell::end(){
|
||||||
|
@@ -63,6 +63,7 @@ public:
|
|||||||
for(Factories::iterator it= factories.begin(); it!=factories.end(); ++it){
|
for(Factories::iterator it= factories.begin(); it!=factories.end(); ++it){
|
||||||
delete it->second;
|
delete it->second;
|
||||||
}
|
}
|
||||||
|
factories.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename R>
|
template<typename R>
|
||||||
|
@@ -77,6 +77,7 @@ void FontManager::end() {
|
|||||||
if(fonts[i] != NULL) {
|
if(fonts[i] != NULL) {
|
||||||
fonts[i]->end();
|
fonts[i]->end();
|
||||||
delete fonts[i];
|
delete fonts[i];
|
||||||
|
fonts[i]=NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fonts.clear();
|
fonts.clear();
|
||||||
|
@@ -115,7 +115,9 @@ void TextFTGL::cleanupFont() {
|
|||||||
delete ftFont;
|
delete ftFont;
|
||||||
ftFont = NULL;
|
ftFont = NULL;
|
||||||
|
|
||||||
free((void*)fontFile);
|
if(fontFile) {
|
||||||
|
free((void*)fontFile);
|
||||||
|
}
|
||||||
fontFile = NULL;
|
fontFile = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,7 +151,9 @@ void TextFTGL::init(string fontName, string fontFamilyName, int fontSize) {
|
|||||||
if(ftFont->Error()) {
|
if(ftFont->Error()) {
|
||||||
printf("FTGL: error loading font: %s\n", fontFile);
|
printf("FTGL: error loading font: %s\n", fontFile);
|
||||||
delete ftFont; ftFont = NULL;
|
delete ftFont; ftFont = NULL;
|
||||||
free((void*)fontFile);
|
if(fontFile) {
|
||||||
|
free((void*)fontFile);
|
||||||
|
}
|
||||||
fontFile = NULL;
|
fontFile = NULL;
|
||||||
throw megaglest_runtime_error("FTGL: error loading font");
|
throw megaglest_runtime_error("FTGL: error loading font");
|
||||||
}
|
}
|
||||||
|
@@ -51,8 +51,9 @@ InterpolationData::InterpolationData(const Mesh *mesh) {
|
|||||||
|
|
||||||
InterpolationData::~InterpolationData(){
|
InterpolationData::~InterpolationData(){
|
||||||
delete [] vertices;
|
delete [] vertices;
|
||||||
|
vertices=NULL;
|
||||||
delete [] normals;
|
delete [] normals;
|
||||||
|
normals=NULL;
|
||||||
|
|
||||||
for(std::map<float, std::map<bool, Vec3f *> >::iterator iterVert = cacheVertices.begin();
|
for(std::map<float, std::map<bool, Vec3f *> >::iterator iterVert = cacheVertices.begin();
|
||||||
iterVert != cacheVertices.end(); ++iterVert) {
|
iterVert != cacheVertices.end(); ++iterVert) {
|
||||||
@@ -61,6 +62,7 @@ InterpolationData::~InterpolationData(){
|
|||||||
delete [] iterVert2->second;
|
delete [] iterVert2->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cacheVertices.clear();
|
||||||
|
|
||||||
for(std::map<float, std::map<bool, Vec3f *> >::iterator iterVert = cacheNormals.begin();
|
for(std::map<float, std::map<bool, Vec3f *> >::iterator iterVert = cacheNormals.begin();
|
||||||
iterVert != cacheNormals.end(); ++iterVert) {
|
iterVert != cacheNormals.end(); ++iterVert) {
|
||||||
@@ -69,6 +71,7 @@ InterpolationData::~InterpolationData(){
|
|||||||
delete [] iterVert2->second;
|
delete [] iterVert2->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cacheNormals.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterpolationData::update(float t, bool cycle){
|
void InterpolationData::update(float t, bool cycle){
|
||||||
|
@@ -56,6 +56,7 @@ void ModelManager::end(){
|
|||||||
if(models[i] != NULL) {
|
if(models[i] != NULL) {
|
||||||
models[i]->end();
|
models[i]->end();
|
||||||
delete models[i];
|
delete models[i];
|
||||||
|
models[i]=NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
models.clear();
|
models.clear();
|
||||||
|
@@ -492,6 +492,7 @@ void ParticleSystem::fade(){
|
|||||||
state= sFade;
|
state= sFade;
|
||||||
if(particleObserver != NULL){
|
if(particleObserver != NULL){
|
||||||
particleObserver->update(this);
|
particleObserver->update(this);
|
||||||
|
particleObserver=NULL;
|
||||||
}
|
}
|
||||||
for(int i=getChildCount()-1; i>=0; i--)
|
for(int i=getChildCount()-1; i>=0; i--)
|
||||||
getChild(i)->fade();
|
getChild(i)->fade();
|
||||||
@@ -1539,6 +1540,7 @@ void ProjectileParticleSystem::update(){
|
|||||||
|
|
||||||
if(particleObserver != NULL){
|
if(particleObserver != NULL){
|
||||||
particleObserver->update(this);
|
particleObserver->update(this);
|
||||||
|
particleObserver=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nextParticleSystem != NULL){
|
if(nextParticleSystem != NULL){
|
||||||
|
@@ -495,6 +495,7 @@ void SimpleTaskThread::execute() {
|
|||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -97,7 +97,7 @@ void createGlFontBitmaps(uint32 &base, const string &type, int size, int width,
|
|||||||
size, 0, 0, 0, width, FALSE, FALSE, FALSE, charSet,
|
size, 0, 0, 0, width, FALSE, FALSE, FALSE, charSet,
|
||||||
OUT_TT_ONLY_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
|
OUT_TT_ONLY_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
|
||||||
DEFAULT_PITCH| (useRealFontName.c_str() ? FF_DONTCARE:FF_SWISS), wstr);
|
DEFAULT_PITCH| (useRealFontName.c_str() ? FF_DONTCARE:FF_SWISS), wstr);
|
||||||
delete [] wstr;
|
if(wstr) delete [] wstr;
|
||||||
assert(font!=NULL);
|
assert(font!=NULL);
|
||||||
|
|
||||||
HDC dc= wglGetCurrentDC();
|
HDC dc= wglGetCurrentDC();
|
||||||
|
@@ -137,7 +137,7 @@ LONG WINAPI PlatformExceptionHandler::handler(LPEXCEPTION_POINTERS pointers){
|
|||||||
CREATE_ALWAYS,
|
CREATE_ALWAYS,
|
||||||
FILE_ATTRIBUTE_NORMAL,
|
FILE_ATTRIBUTE_NORMAL,
|
||||||
0);
|
0);
|
||||||
delete [] wstr;
|
if(wstr) delete [] wstr;
|
||||||
|
|
||||||
//printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
@@ -332,13 +332,13 @@ void message(string message){
|
|||||||
|
|
||||||
LPWSTR wstr = Ansi2WideString(message.c_str());
|
LPWSTR wstr = Ansi2WideString(message.c_str());
|
||||||
MessageBox(NULL, wstr, L"Message", MB_OK | MB_SYSTEMMODAL);
|
MessageBox(NULL, wstr, L"Message", MB_OK | MB_SYSTEMMODAL);
|
||||||
delete [] wstr;
|
if(wstr) delete [] wstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ask(string message){
|
bool ask(string message){
|
||||||
LPWSTR wstr = Ansi2WideString(message.c_str());
|
LPWSTR wstr = Ansi2WideString(message.c_str());
|
||||||
bool result = MessageBox(NULL, wstr, L"Confirmation", MB_YESNO | MB_SYSTEMMODAL) == IDYES;
|
bool result = MessageBox(NULL, wstr, L"Confirmation", MB_YESNO | MB_SYSTEMMODAL) == IDYES;
|
||||||
delete [] wstr;
|
if(wstr) delete [] wstr;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,8 +355,8 @@ void exceptionMessage(const exception &excp){
|
|||||||
LPWSTR wstr = Ansi2WideString(message.c_str());
|
LPWSTR wstr = Ansi2WideString(message.c_str());
|
||||||
LPWSTR wstr1 = Ansi2WideString(title.c_str());
|
LPWSTR wstr1 = Ansi2WideString(title.c_str());
|
||||||
MessageBox(NULL, wstr, wstr1, MB_ICONSTOP | MB_OK | MB_SYSTEMMODAL);
|
MessageBox(NULL, wstr, wstr1, MB_ICONSTOP | MB_OK | MB_SYSTEMMODAL);
|
||||||
delete [] wstr;
|
if(wstr) delete [] wstr;
|
||||||
delete [] wstr1;
|
if(wstr1) delete [] wstr1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//int getScreenW(){
|
//int getScreenW(){
|
||||||
|
@@ -430,6 +430,7 @@ void SoundPlayerOpenAL::end() {
|
|||||||
i != staticSources.end(); ++i) {
|
i != staticSources.end(); ++i) {
|
||||||
delete *i;
|
delete *i;
|
||||||
}
|
}
|
||||||
|
staticSources.clear();
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
@@ -437,6 +438,7 @@ void SoundPlayerOpenAL::end() {
|
|||||||
i != streamSources.end(); ++i) {
|
i != streamSources.end(); ++i) {
|
||||||
delete *i;
|
delete *i;
|
||||||
}
|
}
|
||||||
|
streamSources.clear();
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
@@ -473,6 +473,7 @@ XmlTree::~XmlTree() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete rootNode;
|
delete rootNode;
|
||||||
|
rootNode=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// =====================================================
|
// =====================================================
|
||||||
@@ -574,9 +575,11 @@ XmlNode::~XmlNode() {
|
|||||||
for(unsigned int i=0; i<children.size(); ++i) {
|
for(unsigned int i=0; i<children.size(); ++i) {
|
||||||
delete children[i];
|
delete children[i];
|
||||||
}
|
}
|
||||||
|
children.clear();
|
||||||
for(unsigned int i=0; i<attributes.size(); ++i) {
|
for(unsigned int i=0; i<attributes.size(); ++i) {
|
||||||
delete attributes[i];
|
delete attributes[i];
|
||||||
}
|
}
|
||||||
|
attributes.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlAttribute *XmlNode::getAttribute(unsigned int i) const {
|
XmlAttribute *XmlNode::getAttribute(unsigned int i) const {
|
||||||
|
Reference in New Issue
Block a user