diff --git a/src/lib.rs b/src/lib.rs index 32740b3..aad1628 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -185,6 +185,12 @@ pub struct Connection { unsafe impl Send for Connection {} +impl Drop for Connection { + fn drop(&mut self) { + self.flush_prepared_statement_cache(); + } +} + impl Connection { /// Open a new connection to a SQLite database. ///