diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-07-11 15:06:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-07-11 15:06:41 +0200 |
commit | 0ea92f732f705adb84b2fd1c98b405d0277201af (patch) | |
tree | 3cd34fa149d4361db357c547a33dba94ac35c51e | |
parent | 0eb2f9a50cd70599757bde6056d8981d7f892c0d (diff) |
Free prepared statement cache before closing connection
-rw-r--r-- | odb/pgsql/connection.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/odb/pgsql/connection.cxx b/odb/pgsql/connection.cxx index 51e09b2..afb7670 100644 --- a/odb/pgsql/connection.cxx +++ b/odb/pgsql/connection.cxx @@ -40,6 +40,10 @@ namespace odb connection:: ~connection () { + // Deallocate prepared statements before we close the connection. + // + statement_cache_.reset (); + PQfinish (handle_); } } |