Core/DBLayer: Add some garbage collection on DatabaseWorkerPool shutdown (deleting SQLOperation objects)

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-12-17 16:02:09 +01:00
parent cb08ec0d74
commit 04e5be6276

View File

@@ -103,6 +103,9 @@ class DatabaseWorkerPool
/// Shuts down delaythreads for this connection pool.
m_queue->queue()->deactivate();
while (SQLOperation* op = (SQLOperation*)(m_queue->dequeue()))
delete op;
for (uint8 i = 0; i < m_connectionCount[IDX_ASYNC]; ++i)
{
/// TODO: Better way. probably should flip a boolean and check it on low level code before doing anything on the mysql ctx