Core/DB Layer: Fix a memory leak.

This commit is contained in:
Machiavelli
2012-03-26 01:49:41 +02:00
parent 19f821d00a
commit 43048afc7e
5 changed files with 13 additions and 7 deletions

View File

@@ -68,9 +68,13 @@ MySQLConnection::~MySQLConnection()
}
mysql_close(m_Mysql);
MySQL::Thread_End();
Unlock(); /// Unlock while we die, how ironic
}
//! Can be called synchronously in DatabaseWorkerPool, in which thread-specific variables initialized in the main thread
//! are deallocated.
//! Can also be called by worker threads, in which their respective thread-specific variables are deallocated.
void MySQLConnection::Close()
{
/// Only close us if we're not operating