8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:03:03 +01:00

Jrd's deletePool() now return pointer to next database's pool as suggested by dlh

This commit is contained in:
alexpeshkoff 2006-10-31 12:27:49 +00:00
parent 986ab45be8
commit c7f3b027d6
3 changed files with 8 additions and 5 deletions

View File

@ -98,17 +98,20 @@ JrdMemoryPool *JrdMemoryPool::createPool() {
return result;
}
void JrdMemoryPool::deletePool(JrdMemoryPool* pool) {
JrdMemoryPool** JrdMemoryPool::deletePool(JrdMemoryPool* pool) {
Database* dbb = GET_DBB();
for (int n = 0; n < dbb->dbb_pools.getCount(); ++n)
JrdMemoryPool** rc = 0;
for (size_t n = 0; n < dbb->dbb_pools.getCount(); ++n)
{
if (dbb->dbb_pools[n] == pool)
{
dbb->dbb_pools.remove(n);
rc = dbb->dbb_pools.remove(n);
break;
}
}
fb_assert(rc);
MemoryPool::deletePool(pool);
return rc;
}
void JrdMemoryPool::noDbbDeletePool(JrdMemoryPool* pool) {

View File

@ -50,7 +50,7 @@ protected:
public:
static JrdMemoryPool *createDbPool(Firebird::MemoryStats &stats);
static JrdMemoryPool *createPool();
static void deletePool(JrdMemoryPool* pool);
static JrdMemoryPool** deletePool(JrdMemoryPool* pool);
static void noDbbDeletePool(JrdMemoryPool* pool);
Jrd::DataComprControl* plb_dccs;

View File

@ -317,7 +317,7 @@ private:
if (*itr && *itr == dbb_bufferpool)
dbb_bufferpool = 0;
if (*itr && *itr != dbb_permanent)
JrdMemoryPool::deletePool(*itr);
itr = JrdMemoryPool::deletePool(*itr);
else
++itr;
}