- mdb-dbi-close env dbiprocedure
Close a database handle. Normally unnecessary. Use with care:
This call is not mutex protected. Handles should only be closed by a single thread, and only if no other threads are going to reference the database handle or one of its cursors any further. Do not close a handle if an existing transaction has modified its database. Doing so can cause misbehavior from database corruption to errors like MDB_BAD_VALSIZE (since the DB name is gone).
Closing a database handle is not necessary, but lets (mdb-dbi-open) reuse the handle value. Usually it's better to set a bigger (mdb-env-set-maxdbs), unless that value would be large.
- An environment handle returned by (mdb-env-create)
- A database handle returned by (mdb-dbi-open)