Information générale
Titre:
Object defined by Newobject from a EXE does not release 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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement