From 4c15ebe09d51d22d98e314302652b66f345a56ff Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Thu, 13 Jan 2011 20:28:40 +0100 Subject: Core/DBLayer: Properly deallocate SQLOperation objects from Databaseworkerpool queue. --- src/server/shared/Database/DatabaseWorkerPool.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index 957d93d449b..6c1be4c5a42 100755 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -102,10 +102,8 @@ class DatabaseWorkerPool { sLog->outSQLDriver("Closing down databasepool '%s'.", m_connectionInfo.database.c_str()); - /// Shuts down delaythreads for this connection pool. - m_queue->queue()->deactivate(); - while (SQLOperation* op = (SQLOperation*)(m_queue->dequeue())) - delete op; + /// Shuts down delaythreads for this connection pool by underlying deactivate() + m_queue->queue()->close(); for (uint8 i = 0; i < m_connectionCount[IDX_ASYNC]; ++i) { -- cgit v1.2.3