/// <summary> /// Closes the Cursor /// </summary> /// <remarks> /// This method wraps the native ups_cursor_close function. /// <br /> /// Closes this Cursor and frees allocated memory. All Cursors should /// be closed before closing the Database. /// </remarks> public void Close() { if (handle == IntPtr.Zero) { return; } int st; lock (db) { st = NativeMethods.CursorClose(handle); } if (st != 0) { throw new DatabaseException(st); } handle = IntPtr.Zero; db = null; }