Consultor Eletrônico



Kbase P184351: GET-CHANGES memory leak with ProDataSet child records
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/18/2011
Status: Unverified

SYMPTOM(s):

GET-CHANGES memory leak with ProDataSet child records

When GET-CHANGES is performed on a dataset with related tables, then a memory leak occurs.

The following code will reproduce the problem:

DEFINE VARIABLE h_Changes AS HANDLE NO-UNDO.
DEFINE VARIABLE h_Dataset AS HANDLE NO-UNDO.
DEFINE TEMP-TABLE ttorder NO-UNDO BEFORE-TABLE ttorder-before
FIELD ordernum AS INTEGER FORMAT "9999"
FIELD custnum AS INTEGER FORMAT "9999"
INDEX idxordernum IS PRIMARY UNIQUE ordernum.

DEFINE TEMP-TABLE ttorderln NO-UNDO BEFORE-TABLE ttorderln-before
FIELD ordernum AS INTEGER FORMAT "9999"
FIELD product AS CHARACTER FORMAT "X(30)"
INDEX idxordernum IS PRIMARY ordernum.

DEFINE DATASET dsOrders FOR ttorder, ttorderln
DATA-RELATION OrdersOrderln FOR ttOrder,ttOrderln
RELATION-FIELDS (ttOrder.ordernum,ttOrderln.ordernum).

/*DEFINE DATASET dsOrders FOR ttorder.*/

h_Dataset = DATASET dsOrders:handle.

REPEAT:
TEMP-TABLE ttOrder:tracking-changes = TRUE.
TEMP-TABLE ttOrderln:tracking-changes = TRUE.
CREATE TToRDER.
ASSIGN
ttOrder.ordernum = 1
ttOrder.custnum = 1.
CREATE ttOrderln.
ASSIGN
ttOrderln.ordernum = 1
ttOrderln.product = "product line 1".
TEMP-TABLE ttOrder:tracking-changes = FALSE.
TEMP-TABLE ttOrderln:tracking-changes = FALSE.
create dataset h_Changes.
h_Changes:COPY-DATASET(h_Dataset).
h_Changes:EMPTY-DATASET.
h_Changes:GET-CHANGES(h_Dataset, YES).
h_Dataset:EMPTY-DATASET.
h_changes:EMPTY-DATASET.
delete object h_changes.
h_changes = ?.
END.

FACT(s) (Environment):

If the dataset does not have parent-child related tables (i.e. just a single table) then the memory leak doesn't occur.
Windows
OpenEdge 10.2B

CAUSE:

Bug# OE00205854

FIX:

None at this time