Like DCookie's answer:
General cursor lifetime pattern
OPEN
BIND
EXECUTE
FETCH...FETCH...FETCH
BIND
EXECUTE
FETCH...FETCH...FETCH
...
CLOSE
This cursor can be reused by binding fresh variables to it and re-executing it.
PL / SQL will also support session-level cursor caches to avoid the overhead of re-opening the cursor recently closed. Thus, the cursor that you programmatically close can remain open. Oracle will cover them backstage if necessary.
, . , :
DECLARE
CURSOR c_1 IS SELECT ....;
BEGIN
OPEN c_1;
FETCH c_1 INTO...;
END;
, , c_1 ( ) . , , "CLOSE c_1;" . , .
(, PL/SQL ref), , DBMS_SESSION.MODIFY_PACKAGE_STATE (DBMS_SESSION.FREE_ALL_RESOURCES);