(svn r22116) -Codechange: use PoolBase::Clean() at more places

This commit is contained in:
smatz
2011-02-19 23:05:47 +00:00
parent 642fb19d4f
commit 756cc6cf65
28 changed files with 37 additions and 117 deletions

View File

@@ -24,14 +24,15 @@ PoolBase::~PoolBase()
}
/**
* Clean all pools - calls Pool::CleanPool()
* Clean all pools of given type.
* @param pt pool types to clean.
*/
/* static */ void PoolBase::CleanAll()
/* static */ void PoolBase::Clean(PoolType pt)
{
PoolVector *pools = PoolBase::GetPools();
PoolBase **end = pools->End();
for (PoolBase **ppool = pools->Begin(); ppool != end; ppool++) {
PoolBase *pool = *ppool;
pool->CleanPool();
if (pool->type & pt) pool->CleanPool();
}
}