From 4970c4bff678415063fa08df03557653eb045a8f Mon Sep 17 00:00:00 2001 From: Akinori Hattori Date: Thu, 24 Oct 2013 22:21:37 +0900 Subject: [PATCH] Use sqlite3_close_v2() --- sqlite3.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sqlite3.go b/sqlite3.go index df3ad10..d106285 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -293,12 +293,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) { // Close the connection. func (c *SQLiteConn) Close() error { - s := C.sqlite3_next_stmt(c.db, nil) - for s != nil { - C.sqlite3_finalize(s) - s = C.sqlite3_next_stmt(c.db, nil) - } - rv := C.sqlite3_close(c.db) + rv := C.sqlite3_close_v2(c.db) if rv != C.SQLITE_OK { return ErrNo(rv) }