Process remains in memory.

Process remains in memory.

Postby HunterEC » Tue Jun 03, 2008 2:42 pm

If the program aborts with an error, I closed it via the (X) in Windows (system close) or just exit the application in a normal way the process image remains in memory. Is this normal behavior ? Thank you.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Process remains in memory.

Postby Enrico Maria Giordano » Tue Jun 03, 2008 3:41 pm

No, try the following sample:

Code: Select all  Expand view
#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd

    ACTIVATE WINDOW oWnd

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby HunterEC » Wed Jun 04, 2008 4:22 am

Enrico:

With your sample program the image is discarded from memory as soon as the program exits. Now, I define a Window, Menu and the image remains in memory. Basically it's a indexing program. You select the file and it recreates all indexes. No external resources, DLLs, etc. Pretty simple program. Thank you for your help.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Postby Antonio Linares » Wed Jun 04, 2008 6:50 am

How do you exit from your application ?

Please show us your code or a working sample that has the same behavior, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Otto » Wed Jun 04, 2008 8:03 am

Hello Antoinio,

In some samples I see following code:

EXIT PROCEDURE PrgExit

Set RESOURCES TO
GlobalFree()
ResAllFree()
Release All
SysRefresh()
Clear Memory

RETURN

Do you suggest to use such a procedure?

Thanks in advance
Otto
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Wed Jun 04, 2008 9:55 am

Otto,

It is not needed at all. FWH and Windows automatically take care of those tasks.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

The xFiles (ha,ha,ha)

Postby HunterEC » Wed Jun 04, 2008 11:08 pm

Antonio: thank you for your support. Doing some test before sending you the sample code, I found out that if I got a LOCAL variable called cString the program image remains in memory. I dropped that variable and the images left memory when exiting or closing the program.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: The xFiles (ha,ha,ha)

Postby Enrico Maria Giordano » Thu Jun 05, 2008 6:53 am

???

Try the following sample:

Code: Select all  Expand view
#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oWnd

    LOCAL cString

    DEFINE WINDOW oWnd

    ACTIVATE WINDOW oWnd

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby HunterEC » Thu Jun 05, 2008 7:23 am

Thank you Enrico. But the only thing I did was removing this cString variable and everything worked out. If I define it as a LOCAL the problems comes back.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Postby Enrico Maria Giordano » Thu Jun 05, 2008 7:26 am

Did you try my sample? Otherwise, can you build a minimal sample showing the problem?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Thu Jun 05, 2008 7:27 am

What are the contents of the local cString variable ?

We have never seen something like that before. Very strange.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 81 guests