From b135c6d87142836119a64f50215504c811298826 Mon Sep 17 00:00:00 2001 From: gwenn Date: Mon, 11 Jun 2018 21:39:08 +0200 Subject: [PATCH] Minalist check that there is no memory leak. --- src/vtab/array.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vtab/array.rs b/src/vtab/array.rs index 94a5c6d..450847c 100644 --- a/src/vtab/array.rs +++ b/src/vtab/array.rs @@ -197,11 +197,13 @@ mod test { let mut stmt = db.prepare("SELECT value from rarray(?);").unwrap(); let rows = stmt.query_map(&[&ptr], |row| row.get::<_, i64>(0)).unwrap(); + assert_eq!(2, Rc::strong_count(&ptr)); let mut count = 0; for (i, value) in rows.enumerate() { assert_eq!(i as i64, value.unwrap()-1); count += 1; } assert_eq!(4, count); + assert_eq!(1, Rc::strong_count(&ptr)); } }