Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object defined by Newobject from a EXE does not release
Message
From
17/01/2003 04:54:57
 
 
To
16/01/2003 17:49:28
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00742677
Message ID:
00742785
Views:
12
Hi!

Try CLEAR PROGRAM. VFP caches PRG files compiled code in memory, and if it is from EXE, it also holds EXE.

>*** Code for Start.prg in C:\
>
>DEFINE CLASS clstest AS custom
> PROCEDURE INIT
> WAIT WINDOW "Hello"
> ENDPROC
>ENDDEFINE
>
>*** End Code for Start.prg in C:\
>
>
>
>Compile Start.prg to start.exe and copy it to c:\a\start.exe
>
>Create following test.prg
>
>
>
>*** Test.PRg
>
>lomyobj = NEWOBJECT("clstest","c:\a\start.exe","c:\a\start.exe")
>lomyobj.destroy()
>RELEASE lomyobj
>
>* this code is just to test if start.exe has been release or not
>COPY FILE start.exe TO h:\a\start.exe && this is to test if the
>
>*** End Test.Prg
>
>
>
>Cannot copy c:\start.exe to c:\a\start.exe coz the file is still in memory.
>
>Following are my Observations:
>
>1. Researching the thread, tried to include the module name like,
>
>lomyobj = NEWOBJECT("clstest","start.fxp","c:\a\start.exe")
>
>does not work.
>
>2. Tried including DESTROY event in the class, does not work.
>
>3. Tried releasing the Object in the class, does not work.
>
>5. Tried to copy start.fxp to c:\a does work but now instead of start.exe, start.fxp is not released.
>
>4. FoxPro seems to hold a link or something, since CLEAR ALL, releases Start.exe from memory.
>
>Any feedback will be greatly appreciated.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform