Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory leak?
Message
From
18/11/2004 17:09:08
 
 
To
17/11/2004 22:35:35
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:
00962844
Views:
7
Thank you so much for the code. I write it in my form class, and it works fine. The application memory is recovered instantly. But I can't solve my problem with the requey function after several requerys, In spite of the fact that recovers the memory, the gradual degradation is persistent. I don't know if the problem is in the odbc driver or in the connection. I you have an idea.... But your code is very nice and the application recovers a lot of memory. This was something that I was seeking for a long while.

Thanks

Carlos Miranda




>Hi Carlos

>I cannot say about the memory leak but if all you want is to release memory >then here is the code I use. You can test it easily with taskmanager and >you will see the memory usage drop.

>I call it using a timer set to 5 minutes.


>Here is the code snippet:

>Declare Integer SetProcessWorkingSetSize In kernel32 As >SetProcessWorkingSetSize ;
>Integer hProcess,;
>Integer dwMinimumWorkingSetSize,;
>Integer dwMaximumWorkingSetSize
>Declare Integer GetCurrentProcess In kernel32 As GetCurrentProcess
>nProc = GetCurrentProcess()
>bb = SetProcessWorkingSetSize(nProc,-1,-1)

>and you will see a significant drop in memory used by your app. Actually >this is what happens when your main app (_screen) is minimized, mempry is >released by windows. My code taps into this API.

>Hello every one
>
>I am having a problem of memory leak in one of my applications, basically the aplicacion is designed with cursoradapters, and executes requerys each time that seek or update informacion. 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. Is not a problem with the information, because the cursoradapters are well parametrisized. I you have a suggestion or exist some way of release resources of memory while I am executing the application.
>
>Thanks for your help
>
>Carlos A. Miranda
>MVP Visual Fox Pro
Carlos A. Miranda
E.I.S.lnc
President
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform