aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Database/DatabasePostgre.h
diff options
context:
space:
mode:
authorAnubisss <none@none>2010-01-23 14:45:58 +0100
committerAnubisss <none@none>2010-01-23 14:45:58 +0100
commitd9cb0702158fd045285f2c0a904cb31a45a3864a (patch)
treecdc6a7c6a83c6eea603ae296a653fb9f04945aad /src/shared/Database/DatabasePostgre.h
parentc784110d87666579f18620a98e1e57118db4a9cf (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/shared/Database/DatabasePostgre.h')
-rw-r--r--src/shared/Database/DatabasePostgre.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/Database/DatabasePostgre.h b/src/shared/Database/DatabasePostgre.h
index fcd420ef8e4..cd93f416bfe 100644
--- a/src/shared/Database/DatabasePostgre.h
+++ b/src/shared/Database/DatabasePostgre.h
@@ -45,7 +45,7 @@ class DatabasePostgre : public Database
bool Initialize(const char *infoString);
void InitDelayThread();
void HaltDelayThread();
- QueryResult* Query(const char *sql);
+ QueryResult_AutoPtr Query(const char *sql);
QueryNamedResult* QueryNamed(const char *sql);
bool Execute(const char *sql);
bool DirectExecute(const char* sql);