The DBcursor->c_close function is the standard function for closing a cursor, after which the cursor may no longer be used.