mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 16:37:06 +00:00
[12079] Remove some redundant explicit NULL checks for pointers before delete or delete[] calls since this check is done implicitly when deleting
Signed-off-by: stfx <stfx@hotmail.de>
This commit is contained in:
parent
4a684fe630
commit
21a3ee9267
28 changed files with 80 additions and 160 deletions
|
|
@ -150,24 +150,17 @@ bool Database::Initialize(const char* infoString, int nConns /*= 1*/)
|
|||
void Database::StopServer()
|
||||
{
|
||||
HaltDelayThread();
|
||||
/*Delete objects*/
|
||||
if (m_pResultQueue)
|
||||
{
|
||||
delete m_pResultQueue;
|
||||
m_pResultQueue = NULL;
|
||||
}
|
||||
|
||||
if (m_pAsyncConn)
|
||||
{
|
||||
delete m_pAsyncConn;
|
||||
m_pAsyncConn = NULL;
|
||||
}
|
||||
delete m_pResultQueue;
|
||||
delete m_pAsyncConn;
|
||||
|
||||
m_pResultQueue = NULL;
|
||||
m_pAsyncConn = NULL;
|
||||
|
||||
for (size_t i = 0; i < m_pQueryConnections.size(); ++i)
|
||||
delete m_pQueryConnections[i];
|
||||
|
||||
m_pQueryConnections.clear();
|
||||
|
||||
}
|
||||
|
||||
SqlDelayThread* Database::CreateDelayThread()
|
||||
|
|
@ -644,9 +637,6 @@ SqlTransaction* Database::TransHelper::detach()
|
|||
|
||||
void Database::TransHelper::reset()
|
||||
{
|
||||
if (m_pTrans)
|
||||
{
|
||||
delete m_pTrans;
|
||||
m_pTrans = NULL;
|
||||
}
|
||||
delete m_pTrans;
|
||||
m_pTrans = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue