Bit


Hi,

An VFP application form is closed with the right upper corner x sign.

User does not aware the application has not been terminate completely.

A tomb xyz.exe remain unclosed.

Since "close all" can not be used, what else can avoid the tomb formation

(Thisform.release or else )

Regards,

Bit




Re: Removing Tomb

Bit


My problem is that I have a VFP program terminate accidentally.

And there leave a neon.exe in windows task menu.

I think that some file has not been closed.

What can I do besides using "close all database".

Thanks,

BIT

Bit wrote:

Hi,

An VFP application form is closed with the right upper corner x sign.

User does not aware the application has not been terminate completely.

A tomb xyz.exe remain unclosed.

Since "close all" can not be used, what else can avoid the tomb formation

(Thisform.release or else )

Regards,

Bit






Re: Removing Tomb

Alex Feldstein

To terminate a program you normally use QUIT. When a program does not release from memory (where you can still see it in Task Manager), it is probably because it has not released all instances of all objects. There is a process you must do, called Garbage Collection. The basic idea is that you must make sure you close every object properly and release memory.

See:
http://fox.wikis.com/wc.dll Wiki~ManualGarbageCollection
http://fox.wikis.com/wc.dll Wiki~AppShutDown
http://msdn2.microsoft.com/en-us/library/adk4x38s(VS.80).aspx






Re: Removing Tomb

CetinBasoz

I don't know what the tomb formation is but it sounds like you mean you have a single form appliction, when you close the form, exe doesn't terminate and is still in task manager processes.

Did you include "clear events" anywhere in your code If it's a single form application and you want the exe terminate when form is closed then you can put it in form's Unload event:

clear events





Re: Removing Tomb

Alex Feldstein

CetinBasoz wrote:

I don't know what the tomb formation is but it sounds like you mean you have a single form appliction, when you close the form, exe doesn't terminate and is still in task manager processes.

Did you include "clear events" anywhere in your code If it's a single form application and you want the exe terminate when form is closed then you can put it in form's Unload event:

clear events

Cetin,

I believe "tomb" is a bad automated translation to try to say "dead apps".

Good point about CLEAR EVENTS. I read the message as it was not releasing memory after CLEAR EVENTS, hence my answer. You may be right, it may be that command is missing in his code.





Re: Removing Tomb

dni

Usually "thisform.Release" and "Close databases all" shoud be enought. To be sure the form is closed correct you may put in form properties Closable = .F. ("x" will be not active) and "release" code in a click method of a quit button, adding "clear events" if you have somewere "read events".




Re: Removing Tomb

Tamar E. Granor

Do you really use QUIT I've never found the need since reaching the end of the main program will have the same effect.

I don't like to use QUIT because it makes testing in the IDE difficult.

Tamar




Re: Removing Tomb

Alex Feldstein

Tamar E. Granor wrote:
Do you really use QUIT I've never found the need since reaching the end of the main program will have the same effect.

I don't like to use QUIT because it makes testing in the IDE difficult.

Tamar

On the issue of QUIT. I kind of misspoke. I did not mention that I use a commercial Framework and got into the habit of using a function of it to test for Dev environment, then return, else quit. In reality RETURN is enough. You are correct.