mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-24 01:38:54 +08:00
Fix memory leak and add test
This commit is contained in:
@@ -781,6 +781,7 @@ impl InnerConnection {
|
||||
}
|
||||
|
||||
fn close(&mut self) -> Result<()> {
|
||||
self.remove_hooks();
|
||||
unsafe {
|
||||
let r = ffi::sqlite3_close(self.db());
|
||||
let r = self.decode_result(r);
|
||||
@@ -857,6 +858,10 @@ impl InnerConnection {
|
||||
fn changes(&mut self) -> c_int {
|
||||
unsafe { ffi::sqlite3_changes(self.db()) }
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "hooks"))]
|
||||
fn remove_hooks(&mut self) {
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for InnerConnection {
|
||||
|
Reference in New Issue
Block a user