func (cursor *Cursor) Close() error { if cursor._cursor == nil { return errors.New("Cursor already closed") } C.mdb_cursor_close(cursor._cursor) cursor._cursor = nil return nil }
func (c *Cursor) close() bool { if c._c != nil { if c.txn._txn == nil && !c.txn.readonly { // the cursor has already been released by LMDB. } else { C.mdb_cursor_close(c._c) } c.txn = nil c._c = nil return true } return false }