(svn r16745) -Fix [FS#3011]: invalidate JoinStation window after removing item from the pool

This commit is contained in:
smatz
2009-07-05 13:20:05 +00:00
parent 4764c73f1c
commit aa4ccab6a8
4 changed files with 22 additions and 2 deletions

View File

@@ -108,6 +108,7 @@ DEFINE_POOL_METHOD(void)::FreeItem(size_t index)
this->data[index] = NULL;
this->first_free = min(this->first_free, index);
this->items--;
if (!this->cleaning) Titem::PostDestructor(index);
}
DEFINE_POOL_METHOD(void)::CleanPool()

View File

@@ -221,6 +221,15 @@ struct Pool {
{
return Tpool->items;
}
/**
* Dummy function called after destructor of each member.
* If you want to use it, override it in PoolItem's subclass.
* @param index index of deleted item
* @note when this function is called, PoolItem::Get(index) == NULL.
* @note it's called only when !CleaningPool()
*/
static FORCEINLINE void PostDestructor(size_t index) { }
};
private: