Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programs not releasing from memory
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00262369
Message ID:
00262621
Views:
17
>>>I have a large application that is broken down into different modules and is distributed in several different executable files. Since upgrading from VFP5 to VFP6 SP3, it has suddenly stopped working.
>>>
>>>I have traced the problem down to function names being reused in different executable files.
>>>
>>>For example:
>>>
>>>A.exe calls B.exe and runs a program in B.exe called XYZ. When it finishes executing, B.exe returns back to A.exe.
>>>
>>>A few hundred code lines later A.exe calls C.exe and runs a program in C.exe also called XYZ (although the program name is the same the actual code is completely different from the other XYZ program). And yet VFP6 SP3 is reusing the XYZ program found in B.exe! Even though B.exe is completely out of scope.
>>>
>>>It almost seems like VFP is not releasing any of the functions from memory when the executable file finishes .
>>>
>>>I've had several other developers reproduce the problem, but no one has come up with a solution (other than renaming all of my programs in all of my projects). Any other ideas?
>>
>>Have you tried a CLEAR PROGRAM before calling C.EXE? How exactly are you calling C.EXE and in turn how is it calling the XYZ program in it?
>
>Yes, I have found that CLEAR PROGRAM does work, however I was hoping to not have to put CLEAR PROGRAM all over my code.
>
>I am calling the XYZ program inside of C.EXE just by saying DO XYZ. What is strange is I can get it to work correctly by saying DO XYZ IN XYZ which seems to force it to reload the corrext XYZ program (same as CLEAR PROGRAM).

Instead of CLEAR PROGRAM, you may need to specify that XYZ is in C.EXE by saying DO XYX IN C.EXE. I'm not quite sure how DO XYX IN XYZ can even work, unless the source code for XYZ (XYZ.PRG and it's compiled version XYZ.FXP) are available on the disk when you run it. My GUESS would be that it wouldn't run correctly with only the .EXE's present.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform