mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 10:37:02 +00:00
[8318] Deleted as expected runnable objects at related Thread deleting for avoid memory leaks.
This commit is contained in:
parent
dc8bf0f7e7
commit
0f364bf00a
7 changed files with 30 additions and 15 deletions
|
|
@ -39,7 +39,7 @@ class MANGOS_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:
|
||||
|
|
|
|||
|
|
@ -424,8 +424,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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue