public void Close() { if (closed) throw new InvalidOperationException("Database is already closed."); funcs.close(dbp, 0); closed = true; }