Consultor Eletrônico



Kbase P128470: Memory leak detected when using X-DOCUMENT:SAVE method with an MEMPTR variable
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/23/2008
Status: Unverified

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x

SYMPTOM(s):

Memory leak detected when using X-DOCUMENT:SAVE method with an MEMPTR variable

The ABL code contains more than one invocation of the X-DOCUMENT:SAVE method with the same MEMPTR variable

MEMPTR memory deallocation using SET-SIZE to zero is done only once at the end of the code block

CAUSE:

Enhancement Request# 0000003718

CAUSE:

This is expected behavior as the X-DOCUMENT SAVE method does not implicitly deallocate the memory of the MEMPTR variable,
which has been previously already allocated.

FIX:

Explicitly deallocate MEMPTR variable before each invocation of the X-DOCUMENT SAVE method:
SET-SIZE(varMemPtr) = 0.
XDocVar:SAVE("MEMPTR":U, varMemPtr).