(svn r10799) -Fix: only calling QuickFree and not the destructor on pool cleanups might cause memory leaks due to the way C++ works.

This commit is contained in:
rubidium
2007-08-05 21:20:55 +00:00
parent dfe851e02f
commit 8f719a7b2d
15 changed files with 48 additions and 67 deletions

View File

@@ -18,6 +18,7 @@ void OldMemoryPoolBase::CleanPool()
DEBUG(misc, 4, "[Pool] (%s) cleaning pool..", this->name);
this->cleaning_pool = true;
/* Free all blocks */
for (i = 0; i < this->current_blocks; i++) {
if (this->clean_block_proc != NULL) {
@@ -25,6 +26,7 @@ void OldMemoryPoolBase::CleanPool()
}
free(this->blocks[i]);
}
this->cleaning_pool = false;
/* Free the block itself */
free(this->blocks);