diff options
author | Machiavelli <none@none> | 2010-12-17 16:02:09 +0100 |
---|---|---|
committer | Machiavelli <none@none> | 2010-12-17 16:02:09 +0100 |
commit | 04e5be6276b56c19d25b94d269f4eb71c0bd9972 (patch) | |
tree | 462e3b830a6dfe65c03ea8935cc1e30de2dd1013 /src | |
parent | cb08ec0d74c4c935457e4df2cc480a7b55387b18 (diff) |
Core/DBLayer: Add some garbage collection on DatabaseWorkerPool shutdown (deleting SQLOperation objects)
--HG--
branch : trunk
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/shared/Database/DatabaseWorkerPool.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index 23439487c0d..af33bfbaa4b 100755 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -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 |