summaryrefslogtreecommitdiff
path: root/src/core/pool_func.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/pool_func.cpp')
-rw-r--r--src/core/pool_func.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/pool_func.cpp b/src/core/pool_func.cpp
index 7b65b96a4..999dbe3d9 100644
--- a/src/core/pool_func.cpp
+++ b/src/core/pool_func.cpp
@@ -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();
}
}