1. Yossi Dallal
  2. PowerBuilder
  3. Thursday, 16 November 2023 13:29 PM UTC

Hi, In PB2022 R2 build 2828 64 bit windows 11,

CLOSING MDI application and leaving a window that was opened NOT as a sheet, may cause a memory leakage?

Clarification: a window was opened as a standalone and not part of the MDI.

later, the user closed the MDI frame and that window remains open, while is doing an FTP operation. 

At that moment there is no running application although the window still alive.

The window was opened like: OPEN( w_ftp )

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 16 November 2023 22:56 PM UTC
  2. PowerBuilder
  3. # 1

If you open that window as "OPEN( w_ftp )", that would remain open, as it would be standalone.

Look-up the Open() function and pass in the second parameter "parentwindow". You can use for example the MDI sheet window for that.

Hope it works.

Comment
There are no comments made yet.
Yossi Dallal Accepted Answer Pending Moderation
  1. Thursday, 16 November 2023 21:58 PM UTC
  2. PowerBuilder
  3. # 2

Thank you all for your responses.

This situation is real. We are in migration from PB2017 R3 to PB2022 R2.

In PB2017R3 it is working fine and the user can close and re run the application as much as he wants.

Each time of closing the MDI, the stand alone window is closed too.

In PB2022 R2 when user wants to re run the application after closing the MDI, he has to close it through the task

manager first because the stand alone window remains alive.

For the safe side we will change the logic and to open that window with OpenSheet(-).

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 16 November 2023 14:02 PM UTC
  2. PowerBuilder
  3. # 3

Check Task Manager, the EXE should be there if a window is still running.

The closequery event of the MDI frame window should check to see if any non-sheet windows are open and reject closing.

Comment
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 16 November 2023 13:52 PM UTC
  2. PowerBuilder
  3. # 4

Hi Yossi,

A PB application closes with the last open window. So if you have a open MDI frame window and a open main window the application will still be open if you only close the frame window. You have also to close the main window to close the application.

HTH,

René  

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 16 November 2023 15:40 PM UTC
Hi Guys;

From the sound of it - Yossi's MDI application may *not* coded properly to follow MDI App design / processing rules as this situation should never happen IMHO if coded properly. So it sounds like some refactoring might be in order. Just my $0.02.

Regards ... Chris
  1. Helpful
  1. Roland Smith
  2. Thursday, 16 November 2023 17:39 PM UTC
Change the window to Response and the problem is solved!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.