aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Database
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/Database')
-rw-r--r--src/shared/Database/Database.h2
-rw-r--r--src/shared/Database/DatabaseMysql.cpp4
-rw-r--r--src/shared/Database/DatabasePostgre.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/shared/Database/Database.h b/src/shared/Database/Database.h
index 7f2bdaefdb7..c7390d08a1b 100644
--- a/src/shared/Database/Database.h
+++ b/src/shared/Database/Database.h
@@ -41,7 +41,7 @@ class TRINITY_DLL_SPEC Database
TransactionQueues m_tranQueues; ///< Transaction queues from diff. threads
QueryQueues m_queryQueues; ///< Query queues from diff threads
- SqlDelayThread* m_threadBody; ///< Pointer to delay sql executer
+ SqlDelayThread* m_threadBody; ///< Pointer to delay sql executer (owned by m_delayThread)
ACE_Based::Thread* m_delayThread; ///< Pointer to executer thread
public:
diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp
index 0189b5883f7..f08ea67cbbe 100644
--- a/src/shared/Database/DatabaseMysql.cpp
+++ b/src/shared/Database/DatabaseMysql.cpp
@@ -440,8 +440,8 @@ void DatabaseMysql::InitDelayThread()
assert(!m_delayThread);
//New delay thread for delay execute
- m_threadBody = new MySQLDelayThread(this);
- m_delayThread = new ACE_Based::Thread(*m_threadBody);
+ m_threadBody = new MySQLDelayThread(this); // will deleted at m_delayThread delete
+ m_delayThread = new ACE_Based::Thread(m_threadBody);
}
void DatabaseMysql::HaltDelayThread()
diff --git a/src/shared/Database/DatabasePostgre.cpp b/src/shared/Database/DatabasePostgre.cpp
index c70067dfdba..8d00285255b 100644
--- a/src/shared/Database/DatabasePostgre.cpp
+++ b/src/shared/Database/DatabasePostgre.cpp
@@ -366,8 +366,8 @@ void DatabasePostgre::InitDelayThread()
assert(!m_delayThread);
//New delay thread for delay execute
- m_threadBody = new PGSQLDelayThread(this);
- m_delayThread = new ACE_Based::Thread(*m_threadBody);
+ m_threadBody = new PGSQLDelayThread(this); // Will be deleted on m_delayThread delete
+ m_delayThread = new ACE_Based::Thread(m_threadBody);
}
void DatabasePostgre::HaltDelayThread()