aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/view-result.txx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/sqlite/view-result.txx')
-rw-r--r--odb/sqlite/view-result.txx5
1 files changed, 5 insertions, 0 deletions
diff --git a/odb/sqlite/view-result.txx b/odb/sqlite/view-result.txx
index c240add..49d0e68 100644
--- a/odb/sqlite/view-result.txx
+++ b/odb/sqlite/view-result.txx
@@ -15,6 +15,8 @@ namespace odb
view_result_impl<T>::
~view_result_impl ()
{
+ if (!this->end_)
+ statement_->free_result ();
}
template <typename T>
@@ -76,7 +78,10 @@ namespace odb
this->current (pointer_type ());
if (!statement_->next ())
+ {
+ statement_->free_result ();
this->end_ = true;
+ }
}
template <typename T>