diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-15 13:17:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-19 11:40:30 +0200 |
commit | 8112bd0febcfa1e3a76e0d03363facbefc3822f7 (patch) | |
tree | 0f5a05b9b29ae7d77e95f7831c214b385aaf6a3b /odb/sqlite/connection.cxx | |
parent | d94948b8bccfd8748245726487d54c41bb199baf (diff) |
Implement early connection release
Diffstat (limited to 'odb/sqlite/connection.cxx')
-rw-r--r-- | odb/sqlite/connection.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/odb/sqlite/connection.cxx b/odb/sqlite/connection.cxx index bcf28a2..b62ac8c 100644 --- a/odb/sqlite/connection.cxx +++ b/odb/sqlite/connection.cxx @@ -104,7 +104,8 @@ namespace odb { // Destroy prepared query statements before freeing the connections. // - prepared_map_.clear (); + recycle (); + clear_prepared_map (); } transaction_impl* connection:: @@ -176,15 +177,8 @@ namespace odb // The current first statement will remove itself from the list // and make the second statement (if any) the new first. // - while (statement* s = statements_) - { - if (!s->cached ()) - s->finilize (); - else if (s->active ()) - s->reset (); - else - assert (false); // Statement is neither active nor unached. - } + while (statements_ != 0) + statements_->reset (); } } } |