diff options
author | Anubisss <none@none> | 2010-01-23 14:45:58 +0100 |
---|---|---|
committer | Anubisss <none@none> | 2010-01-23 14:45:58 +0100 |
commit | d9cb0702158fd045285f2c0a904cb31a45a3864a (patch) | |
tree | cdc6a7c6a83c6eea603ae296a653fb9f04945aad /src/trinitycore/Master.cpp | |
parent | c784110d87666579f18620a98e1e57118db4a9cf (diff) |
Implement QueryResult_AutoPtr type which is ACE's reference counted auto_ptr(ACE_Refcounted_Auto_Ptr) for QueryResult pointers.
Use this auto_ptr for every DB queries(except QueryNamedResult yet).
This patch guarantees NO memory leaks from QueryResult pointers.
Thanks to raczman for the idea and for the helping to make this patch.
--HG--
branch : trunk
Diffstat (limited to 'src/trinitycore/Master.cpp')
-rw-r--r-- | src/trinitycore/Master.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index 221ce4967a9..41169565565 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -135,9 +135,9 @@ public: { loopCounter = 0; sLog.outDetail ("Ping MySQL to keep connection alive"); - delete WorldDatabase.Query ("SELECT 1 FROM command LIMIT 1"); - delete loginDatabase.Query ("SELECT 1 FROM realmlist LIMIT 1"); - delete CharacterDatabase.Query ("SELECT 1 FROM bugreport LIMIT 1"); + WorldDatabase.Query ("SELECT 1 FROM command LIMIT 1"); + loginDatabase.Query ("SELECT 1 FROM realmlist LIMIT 1"); + CharacterDatabase.Query ("SELECT 1 FROM bugreport LIMIT 1"); } } |