Navigation Menu

Skip to content

Commit

Permalink
Fix issue #19
Browse files Browse the repository at this point in the history
Statement with repeatable query never deallocated on server side
  • Loading branch information
b-s-a authored and mloskot committed Dec 4, 2012
1 parent e341ccc commit 8c05035
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/backends/postgresql/soci-postgresql.h
Expand Up @@ -144,6 +144,7 @@ struct postgresql_session_backend;
struct postgresql_statement_backend : details::statement_backend
{
postgresql_statement_backend(postgresql_session_backend & session);
~postgresql_statement_backend();

virtual void alloc();
virtual void clean_up();
Expand Down
6 changes: 6 additions & 0 deletions src/backends/postgresql/statement.cpp
Expand Up @@ -37,6 +37,12 @@ postgresql_statement_backend::postgresql_statement_backend(
{
}

postgresql_statement_backend::~postgresql_statement_backend()
{
if (statementName_.empty() == false)
session_.deallocate_prepared_statement(statementName_);
}

void postgresql_statement_backend::alloc()
{
// nothing to do here
Expand Down

0 comments on commit 8c05035

Please sign in to comment.