DBMS_SQL.TO_REFCURSOR Leaks Memory When Used In a Loop

(Doc ID 2335805.1)

Last updated on DECEMBER 12, 2017

Applies to:

PL/SQL - Version 11.2.0.4 and later
Information in this document applies to any platform.

Symptoms

The code is using DBMS_SQL.TO_REFCURSOR in a PL/SQL FOR loop and you observe memory leak. For example when you run the below sample code you will see the memory leak.

In session 1 run the below PL/SQL block:

 

Changes

None. 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms