When your application has finished using the cursor, it should be closed using the CLOSE statement. For example:
Normally, when a cursor is closed, all locks on data and tables are released. If the cursor is closed within a transaction,
however, the locks may not be released.
- The ORACLE precompiler directive, MODE, affects what happens to a cursor when either the commit or rollback command is used.
For more information on the use of the precompiler directive MODE, refer to the Programmer's Guide to the ORACLE Precompilers.
- When a cursor is closed, the ORACLE client may deallocate the memory and resources associated with the cursor. The following
precompiler options control the deallocation of cursors: HOLD_CURSOR, MAXOPENCURSORS and RELEASE_CURSOR. For more information
on the use of the precompiler directives, refer to the Programmer's Guide to the ORACLE Precompilers.