mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 14:11:15 +02:00
- getting fanatical about memory cleanup so that valgrind output is more useful
This commit is contained in:
@@ -561,6 +561,8 @@ UnitParticleSystem::UnitParticleSystem(int particleCount):
|
||||
|
||||
startTime = 0;
|
||||
endTime = 1;
|
||||
|
||||
radiusBasedStartenergy = false;
|
||||
}
|
||||
|
||||
UnitParticleSystem::~UnitParticleSystem(){
|
||||
|
@@ -192,6 +192,13 @@ CURL *SystemFlags::initHTTP() {
|
||||
}
|
||||
|
||||
void SystemFlags::globalCleanupHTTP() {
|
||||
|
||||
if(curl_handle != NULL) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
SystemFlags::cleanupHTTP(&curl_handle, true);
|
||||
curl_handle = NULL;
|
||||
}
|
||||
|
||||
if(SystemFlags::curl_global_init_called == true) {
|
||||
SystemFlags::curl_global_init_called = false;
|
||||
//printf("HTTP cleanup\n");
|
||||
@@ -297,14 +304,7 @@ SystemFlags::~SystemFlags() {
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
if(curl_handle != NULL) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
SystemFlags::cleanupHTTP(&curl_handle, true);
|
||||
curl_handle = NULL;
|
||||
}
|
||||
if(SystemFlags::curl_global_init_called == true) {
|
||||
SystemFlags::globalCleanupHTTP();
|
||||
}
|
||||
SystemFlags::globalCleanupHTTP();
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
Reference in New Issue
Block a user