Skip to main content

[archive] Memory Leaks

  • February 14, 2007
  • 2 replies
  • 0 views

[Migrated content. Thread originally posted on 29 January 2007]

Hi,

Recently discovered that when using acubench to create screens that bitmaps & menus are not destroyed when the program exits.

But something else is keeping memory and I don't know what just yet.
for example
CALL "nlsnbh" USING BY REFERENCE LINKAGE-SECTION-RECORD
LINKAGE-SEL-NBH-RECORD.
CANCEL "nlsnbh".

Just before the call the debugger tells me that the total memory used is 684829
And just after the cancel its 684899.
The screen in question has
A menu
A paged list box
An OK button
and a status bar

When the program ends instead of it doing the generated code for PERFORM Acu-Exit-Rtn we do
CALL "W$MENU" USING WMENU-DESTROY, Screen1-Mn-1-Handle
EXIT PROGRAM
STOP RUN

Does anyone else know what else might not get destroyed?

Thanks,

Shaun

2 replies

[Migrated content. Thread originally posted on 29 January 2007]

Hi,

Recently discovered that when using acubench to create screens that bitmaps & menus are not destroyed when the program exits.

But something else is keeping memory and I don't know what just yet.
for example
CALL "nlsnbh" USING BY REFERENCE LINKAGE-SECTION-RECORD
LINKAGE-SEL-NBH-RECORD.
CANCEL "nlsnbh".

Just before the call the debugger tells me that the total memory used is 684829
And just after the cancel its 684899.
The screen in question has
A menu
A paged list box
An OK button
and a status bar

When the program ends instead of it doing the generated code for PERFORM Acu-Exit-Rtn we do
CALL "W$MENU" USING WMENU-DESTROY, Screen1-Mn-1-Handle
EXIT PROGRAM
STOP RUN

Does anyone else know what else might not get destroyed?

Thanks,

Shaun
Hi , I think you should send this issue to tech support.

[Migrated content. Thread originally posted on 29 January 2007]

Hi,

Recently discovered that when using acubench to create screens that bitmaps & menus are not destroyed when the program exits.

But something else is keeping memory and I don't know what just yet.
for example
CALL "nlsnbh" USING BY REFERENCE LINKAGE-SECTION-RECORD
LINKAGE-SEL-NBH-RECORD.
CANCEL "nlsnbh".

Just before the call the debugger tells me that the total memory used is 684829
And just after the cancel its 684899.
The screen in question has
A menu
A paged list box
An OK button
and a status bar

When the program ends instead of it doing the generated code for PERFORM Acu-Exit-Rtn we do
CALL "W$MENU" USING WMENU-DESTROY, Screen1-Mn-1-Handle
EXIT PROGRAM
STOP RUN

Does anyone else know what else might not get destroyed?

Thanks,

Shaun
I have done so already.

I didn't state that the above testing was in a thinclient environment, but here what I know so far.

In normal 7.2 runtime, for each program called, you loose the length of program ID 1 byte. So, if your're calling loads of programs it would mount up.

I believe the same is true for thinclient, however tech support believe from the developers that possible the debugger isn't returning correct information regarding memory usage.
It's been sent to the developers for further analysis.

Shaun