and fix a ton more minor performance issues

This commit is contained in:
DarthArgus
2014-10-27 22:39:57 -07:00
parent 14eaf713d0
commit c9c39d5713
97 changed files with 266 additions and 376 deletions
@@ -84,8 +84,7 @@ AuctionTransferAPI::AuctionTransferAPI(const char *hostNames, const char *identi
//////////////////////////////////////////////////////////////////////////////////////
AuctionTransferAPI::~AuctionTransferAPI()
{
if( m_apiCore)
delete m_apiCore;
delete m_apiCore;
}
//////////////////////////////////////////////////////////////////////////////////////
@@ -33,10 +33,7 @@ void put(Base::ByteStream &msg, const Blob &source);
//////////////////////////////////////////////////////////////////////////////////////
Blob::~Blob()
{
if (m_data)
{
delete [] m_data;
}
delete [] m_data;
}
//////////////////////////////////////////////////////////////////////////////////////
@@ -301,10 +301,7 @@ int TcpConnection::finishConnect()
TcpConnection::~TcpConnection()
{
if (m_recvBuff != NULL)
{
delete [] m_recvBuff;
}
delete [] m_recvBuff;
while(m_head != NULL)
{
@@ -543,8 +540,7 @@ int TcpConnection::processIncoming()
}
else if (m_params.maxRecvMessageSize == 0)
{
if (m_recvBuff!=NULL)
delete [] m_recvBuff;
delete [] m_recvBuff;
m_recvBuff = new char[m_bytesNeeded-4];
}
else if (m_params.maxRecvMessageSize != 0 && (m_bytesNeeded-4) > m_params.maxRecvMessageSize)
@@ -78,7 +78,7 @@ class CA2GZIPT
}
~CA2GZIPT()
{
if(pgzip!=m_buffer) TRYFREE(pgzip);
free(pgzip);
}
void Init(char *lpsz,int len=-1)
{
@@ -191,7 +191,7 @@ class CA2GZIPT
err = deflateEnd(&(m_zstream));
}
if (m_z_err < 0) err = m_z_err;
TRYFREE(m_outbuf);
free(m_outbuf);
return err;
}
@@ -219,7 +219,7 @@ class CGZIP2AT
}
~CGZIP2AT()
{
if(psz!=m_buffer) TRYFREE(psz);
if(psz!=m_buffer) free(psz);
}
void Init()
{
@@ -463,7 +463,7 @@ class CGZIP2AT
err = inflateEnd(&(m_zstream));
}
if (m_z_err < 0) err = m_z_err;
TRYFREE(m_inbuf);
free(m_inbuf);
return err;
}