Minalist check that there is no memory leak.

This commit is contained in:
gwenn 2018-06-11 21:39:08 +02:00
parent e040dc9e1f
commit b135c6d871

View File

@ -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));
}
}