aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database/MySQLConnection.cpp
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2012-03-26 01:49:41 +0200
committerMachiavelli <machiavelli.trinity@gmail.com>2012-03-26 08:29:41 +0200
commit43048afc7e95e895e8d98ebb242692b456e4e7ca (patch)
tree1e9726f0b3324428d65a70d066d131d1811661d0 /src/server/shared/Database/MySQLConnection.cpp
parent19f821d00a2ce2e2b6bc5b972a6cc9759ff3e4ee (diff)
Core/DB Layer: Fix a memory leak.
Diffstat (limited to 'src/server/shared/Database/MySQLConnection.cpp')
-rwxr-xr-xsrc/server/shared/Database/MySQLConnection.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp
index f686db4c199..273d2842505 100755
--- a/src/server/shared/Database/MySQLConnection.cpp
+++ b/src/server/shared/Database/MySQLConnection.cpp
@@ -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