Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory leak?
Message
De
17/11/2004 22:35:35
 
 
À
15/11/2004 19:39:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP3
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00961575
Message ID:
00962478
Vues:
8
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform