Hi
Firstly apologies for a long post, but really stumped.
I have an application written in VFP9 SP1, backend SQL Server 2000.
This runs on Windows 2003 Terminal Server, and developed on a Windows
2000 PC.
We now have problems with memory usage and the dreaded "Visual Foxpro
has encountered a problem and needs to close" which happens every now
and again.
The application allows users to open multiple forms within the _SCREEN
environment.
When opening and closing one screen, memory usage is OK and stable,
i.e. gets allocated and released when viewed in Windows task manager
with only miminal increases).
However, if a user opens multiple windows (forms), then the memory
usage gradually goes up and up.
For example (using windows task manager)
Form 1 - 15688 K
Form 1 & 2 - 18756 K
Close Form 2 - 17756 K
Open Form 2 - 18992 K
Close Form 2 - 18652 K
Open Form 2 - 19016 K
Close Form 2 - 18624 K
So you can see, with continued use with numerous forms, the usage goes
up and the application slows down.
Following this, I used the Sys(1011) function and got these results:
Form 1 - 3930
Form 1 & 2 - 6360
Close Form 2 - 3952
Open Form 2 - 6381
Close Form 2 - 3974
So this goes up as well.
---------------------------------------------------------------------------
Now, when a form is released, surley all memory is released and
allocated back.
So I added a SYS(1104) to make sure but this had no impact on memory
in task manager.
Anybody got any ideas or pointers?
Many Thanks
---------------------------------------------------------------------------