Commit 885c27d1 authored by gwenn's avatar gwenn

Adds docs on wrapper behaviour relating to GC.

parent b0f97339
......@@ -34,7 +34,7 @@ SQLite logs (SQLITE_CONFIG_LOG) can be activated by:
- ConfigLog function
- or `export SQLITE_LOG=1`
Misc:
### Misc:
Conn#Exists
Conn#OneValue
......@@ -89,6 +89,14 @@ Function:
Conn#CreateScalarFunction
Conn#CreateAggregateFunction
### GC:
Although Go is gced, there is no destructor (see http://www.airs.com/blog/archives/362).
In the gosqlite wrapper, no finalizer is used.
So users must ensure that C ressources (database connections, prepared statements, BLOBs, Backups) are destroyed/deallocated by calling Conn#Close, Stmt#Finalize, BlobReader#Close, Backup#Close.
Therefore, sqlite3_close/sqlite3_next_stmt are used by Conn#Close to free the database connection and all dangling statements (not sqlite3_close_v2) (see http://sqlite.org/c3ref/close.html).
### Benchmarks:
$ go test -test.bench .
<pre>
BenchmarkValuesScan 500000 4658 ns/op
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment