Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory leak?
Message
From
17/11/2004 03:25:00
 
 
To
15/11/2004 19:39:32
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP3
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00961575
Message ID:
00962053
Views:
8
Hi,
>The problem is that after several requerys the aplicacion suffers a gradual degradation, if I leave the screen and I enter again returns faster again, apparently the requerys or memory are consuming a lot of memory.

Windows memory allocation sometimes works strangely. Try the following with task manager a visible but not active window:
1) Switch from the window consuming too much memory and get back
2) minimize the window consuming too much memory and send it to the taskbar, then open up again

Depending on your system the amount of memory used at the moment should be trimmed, more so by option 2. If this is what you are after, you can close the window programmatically via sendmessage WINAPI or use the Windows API to do the memory reshuffling caused by minimizing the window. AFAIR the calls are named Get/SetWorkingProcessMemory or something similar. Update: see Bernard's code for the correct spelling and declaration, but keep in mind that some of the memory will be reclaimed rather fast. EndUpdate

Be sure to measure the effect on return time, as the memory sometimes needs to be reclaimed and performance might be affected negatively! I played around with it and mostly found it unnecessary to work with it, but if it helps in your situation I'ld be happy to hear about your usecase and your timing results. At least the amount of memory shown in the task manager is drastically reduced, sometimes helping with users worried about memory issues. But keep in mind that it might be just window dressing<g>.

HTH

thomas
Previous
Reply
Map
View

Click here to load this message in the networking platform