public void Close() { if (closed) throw new InvalidOperationException("Database is already closed."); funcs.close(dbp, 0); // this is segfaulting on close of mono! closed = true; }